On Thu, Feb 24, 2011 at 6:34 PM, Bhasker Harihara < harihara.bhas...@gmail.com> wrote:
> > > On Thu, Feb 24, 2011 at 6:19 PM, Jim Ruther Nill <jvn...@gmail.com> wrote: > >> >> >> On Thu, Feb 24, 2011 at 8:36 PM, Bhasker Harihara < >> harihara.bhas...@gmail.com> wrote: >> >>> >>> >>> On Thu, Feb 24, 2011 at 5:55 PM, Colin Law <clan...@googlemail.com>wrote: >>> >>>> On 24 February 2011 12:09, Bhasker Harihara <harihara.bhas...@gmail.com> >>>> wrote: >>>> > ... >>>> > Can you also expalin how validates get the values from the form_for >>>> >>>> It doesn't, your code does that and then calls save. When you call >>>> save the validations get called at appropriate points around the save >>>> to check the data. >>>> >>>> I mean in which variable validates gets the value from, The actual line in the program is validates :uname, :presence => true, :length => { :maximum => 50 } Have a look at the Rails Guide 'ActiveRecord Validations and Callback'. >>>> >>>> Colin >>>> >>>> -- >>>> >>> >>> I click "sign up" -> form_for gets displayed -> I click "save" then in >>> user.rb validates takes place. Am I correct to say this. >>> >> >> simplest way to explain it. i guess. >> >> > Sorry, i did not get you. I said what I have learnt from the tutorial. > For brevity, I skipped the controller parts. > > >> >>> Regards, >>> >>>> 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 rubyonrails-talk@googlegroups.com. >>>> To unsubscribe from this group, send email to >>>> rubyonrails-talk+unsubscr...@googlegroups.com. >>>> For more options, visit this group at >>>> http://groups.google.com/group/rubyonrails-talk?hl=en. >>>> >>>> >>> -- >>> 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 rubyonrails-talk@googlegroups.com. >>> To unsubscribe from this group, send email to >>> rubyonrails-talk+unsubscr...@googlegroups.com. >>> For more options, visit this group at >>> http://groups.google.com/group/rubyonrails-talk?hl=en. >>> >> >> >> >> -- >> ------------------------------------------------------------- >> visit my blog at http://jimlabs.heroku.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 rubyonrails-talk@googlegroups.com. >> To unsubscribe from this group, send email to >> rubyonrails-talk+unsubscr...@googlegroups.com. >> For more options, visit this group at >> http://groups.google.com/group/rubyonrails-talk?hl=en. >> > > -- 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 rubyonrails-talk@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.