Can you show some code? What''s in the controller for create? What is
the rhtml code for the form?
Also, your resources should be plural, like a table name:
map.resources :guitars
This link has been the most helpful for me:
http://david.goodlad.ca/articles/2006/08/02/simply_restful-in-rails-core
On 10/3/06, rmmcgr
<richard.mcgrath-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:>
> Hi,
>
> I have got edge rails (as of 03 October) and tried to get a new app I
> am building to use the new Restful approach. Followed the examples in
> Agile Web Development (2nd Ed) and issued a "scaffold_resource"
command
> for my model.
>
> However when I attempt to create a new record, and click
"create", it
> just goes back to the index view for the model. What might I be doing
> wrong?
>
> Steps were:
> 1. Created table via migrations (all worked well, table created ok.
> Using Sqlite3).
> 2. Issued the command "ruby script/generate scaffold_resource
> <mymodelname>"
> 3. Put the line in the routes.rb file, "map.resources
:<mymodelname>".
>
> Then tried to run it and found the problem where it wont add anything.
>
> Thanks for any help,
> Richard
>
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---