2009/6/4 Newb Newb <[email protected]>: > > Colin Law wrote: >> 2009/6/4 Newb Newb <[email protected]>: >>> >>> Hi... >>> I use non modal attribute for companyinfo modal.. >>> For that i have created like below >>> >>> attr_accessor :std_code >>> >> >> I am not sure what you mean by a non modal attribute. >> >>> pls help >> Have you checked in the rails log that std_code is being passed in >> with the params? >> >> Colin > > yes it has been passed with params > > actually i dont have any field like std_code into my table. > so i mentioned as non modal attribute > i use like below in my form. > <%= error_message_on( @company, :std_code) -%> > <%= f.text_field :std_code, { :class => "txtbox",:size => "2" } %> > pls guide me > --
I have not tried to validate an attribute that is not in the table. If it is not saving it what is the point of the validation? I would suggest using ruby-debug to break into the controller just before the validation and check the value of std_code. Colin --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

