That''s give me an error :: <%= form "user" %> :: <%= input "user", "username" %> :: <%= end_form_tag %> NoMethodError in Home#index Showing app/views/components/_loginbox.rhtml where line #1 raised: You have a nil object when you didn''t expect it! You might have expected an instance of ActiveRecord::Base. The error occurred while evaluating nil.new_record? Note that the directory /components/ doesn''t match a controller (but it isn''t important). Why? -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Hi! Unless i am missing something, there is no helper method just ''form'' you might use form_for or form_tag. (start_form_tag is deprecated from Rails 1.2.1) For full list please refer http://api.rubyonrails.com/classes/ActionView/Helpers/FormTagHelper.html Thanks and regards, Swanand. On 4/30/07, Roberto Casadei <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > > That''s give me an error > > :: <%= form "user" %> > :: <%= input "user", "username" %> > :: <%= end_form_tag %> > > NoMethodError in Home#index > Showing app/views/components/_loginbox.rhtml where line #1 raised: > > You have a nil object when you didn''t expect it! > You might have expected an instance of ActiveRecord::Base. > The error occurred while evaluating nil.new_record? > > Note that the directory /components/ doesn''t match a controller (but it > isn''t important). > > Why? > > -- > 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Swanand Deodhar wrote:> Hi! > Unless i am missing something, there is no helper method just ''form'' > you > might use form_for or form_tag. (start_form_tag is deprecated from Rails > 1.2.1) > For full list please refer > http://api.rubyonrails.com/classes/ActionView/Helpers/FormTagHelper.html > Thanks and regards, > Swanand.Sorry, I changed it in order to try to resolve the error. Actually, the error is: You have a nil object when you didn''t expect it! You might have expected an instance of ActiveRecord::Base. The error occurred while evaluating nil.column_for_attribute And match the row: <%= input "user", "username" %> -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Hi! As you are trying have an rhtml page with a textfield corresponding to a username column of users table. You might wanna try <%= text_field :user, :username%>. I am not too sure what is <%= input%> Thanks and regards, Swanand On 4/30/07, Roberto Casadei <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > > Swanand Deodhar wrote: > > Hi! > > Unless i am missing something, there is no helper method just ''form'' > > you > > might use form_for or form_tag. (start_form_tag is deprecated from Rails > > 1.2.1) > > For full list please refer > > > http://api.rubyonrails.com/classes/ActionView/Helpers/FormTagHelper.html > > Thanks and regards, > > Swanand. > > Sorry, I changed it in order to try to resolve the error. > > Actually, the error is: > > You have a nil object when you didn''t expect it! > You might have expected an instance of ActiveRecord::Base. > The error occurred while evaluating nil.column_for_attribute > > And match the row: > <%= input "user", "username" %> > > -- > 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Swanand Deodhar wrote:> Hi! > As you are trying have an rhtml page with a textfield > corresponding > to a username column of users table. > You might wanna try <%= text_field :user, :username%>. > I am not too sure what is <%= input%> > Thanks and regards, > SwanandMMmmh it doesn''t work. input => http://api.rubyonrails.org/classes/ActionView/Helpers/ActiveRecordHelper.html#M000565 -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---