Ralph Shnelvar wrote: > Marnen Laibow-Koser wrote: >> Ralph Shnelvar wrote: >>> Newb here. >>> >>> I have a form and a value that is being displayed ... and I have no idea >>> where the value came from. >>> >>> I have done a >>> <%= debugger; '' %> >>> in the form and, indeed, the debugger stops at the statement. >>> >>> I have tried to trace through the code to see where the value came from >>> ... and I gave up. >>> >> >> You're going to have to describe the problem in more detail, with actual >> code, if you want help. And what do your tests say? >> >>> >>> >>> >>> So ... what in Rails initializes the fields of a form? >> >> If you're using form_for -- and you didn't say if you were! -- then the >> form is initialized from the supplied model object. > > > > Ok ... here's the code > > --------------------------------------------- > > \zauth\app\views\users\new.html.erb
Note: This isn't relevant to the issue at hand, but I *highly* recommend Haml instead of ERb. > <fieldset> > <legend>Signup for eMeantime Membership</legend> > <%= error_messages_for :user %> > > <% form_for :user, :url => users_path do |f| -%> > > <p><label for="login">Login:</label><br/> > <%= f.text_field :login %> <br/> > <cite>Ex., aedenfield</cite> > > <p><label for="email">Email:</label><br/> > <%= debugger; '' -%> > <%= f.text_field :email %><br/> > <cite>Ex., [email protected]. A valid email is required for an active > account.</cite> <cite> is for book titles, not hints. Learn to use HTML properly. > > <p><label for="password">Password:</label><br/> > <%= f.password_field :password %><br/> This all looks fine. [...] > I apologize for the length of the code but since I am lost as to where > in the model the code initializes the form ... I provided everything. Read the form_for docs and the Rails guides. > > > The fields that seem to be inappropriately initialized are the fields > associated with :email (definitely) and :password (maybe). Initialized with what? You've provided everything but the essential info. :) > > The :password field has big dots in it ... and it _may_ be initialized > ... I can't tell. What do you mean, you can't tell? What is the generated HTML like? Best, -- Marnen Laibow-Koser http://www.marnen.org [email protected] -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

