Manika Suri
2008-May-02 07:21 UTC
undefined method `start_form_tag'' for #<ActionView::Base:0x3
I have crated controller classified class ClassifiedController < ApplicationController def list @classifieds = Classified.find(:all) end def show @classified = Classified.find(params[:id]) end def new @classified=Classified.new end def create end def edit end def update end def delete end end and created classified/new.rhtml Attachments: http://www.ruby-forum.com/attachment/1830/new.rhtml -- 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 -~----------~----~----~----~------~----~------~--~---
Frederick Cheung
2008-May-02 09:04 UTC
Re: undefined method `start_form_tag'' for #<ActionView::Base:0x3
start_form_tag has been deprecated and subsequently removed. use form_tag instead: <% form_tag :action => :foo, ... do %> form elements here <% end> --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Franky Lucky
2010-Feb-19 19:03 UTC
Re: undefined method `start_form_tag'' for #<ActionView::Base:0x3
While doing a tutorial on tutorialpoint, I had the same problem! I made the change, but I get another error : NoMethodError in Book#new Showing app/views/book/new.rhtml where line #4 raised: undefined method `title'' for #<Book id: nil, created_at: nil, updated_at: nil> Extracted source (around line #4): 1: <h1>Add new book</h1> 2: <%= form_tag :action => ''create'' %> 3: <p><label for="book_title">Title</label>: 4: <%= text_field ''book'', ''title'' %></p> 5: <p><label for="book_price">Price</label>: 6: <%= text_field ''book'', ''price'' %></p> 7: <p><label for="book_subject">Subject</label>: here is the new.rhtml file: <h1>Add new book</h1> <%= form_tag :action => ''create'' %> <p><label for="book_title">Title</label>: <%= text_field ''book'', ''title'' %></p> <p><label for="book_price">Price</label>: <%= text_field ''book'', ''price'' %></p> <p><label for="book_subject">Subject</label>: <%= collection_select(:book,:subject_id,@subjects,:id,:name) %></p> <p><label for="book_description">Description</label><br/> <%= text_area ''book'', ''description'' %></p> <%= submit_tag "Create" %> <%= end_form_tag %> <%= link_to ''Back'', {:action => ''list''} %> thanx indeed for your help! Tantor Frederick Cheung wrote:> start_form_tag has been deprecated and subsequently removed. use > form_tag instead: > > <% form_tag :action => :foo, ... do %> > form elements here > <% end>-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.