scootiePuff
2007-May-31 00:32 UTC
clarifications for online wiki TutorialHelperMethods page ?
hello, i''m confused with the instructions on this page: http://wiki.rubyonrails.org/rails/pages/TutorialHelperMethods at the top of this page in red, it reads: ''Error in previous page: The show.rhtml does not exist. In previous versions of the Scaffolding tutorial it tells you to change the name of the view.rhtml file to show.rhtml and to change the controller accordingly, but with a parameter, like this: def show @person=Person.find(@params["id"]) end And create show.rhtml as a copy of view.rhtml'' first it says above, ''change the name of the view.rhtml file to show.rhtml..'' and then it later says above, ''and create show.rhml as a copy of view.rhtml''. but this is confusing. 1. in my app/views/friends/, i see a ''view.rhtml'' file. 2. i change the name of this file from view.rhtml to show.rhtml. done. 3. i edit the app/controllers/friends_controller.rb replacing ''view'' with ''show'' and replacing the Person.find parameter information. 4. then it says ''create show.rhtml as a copy of view.rhtml'' -- but i just moved view.rhtml to show.rhtml in #1, so show.rhtml already exists, and view.rhtml no longer exists! could someone please clarify this for me and/or on that web page as well? furthermore, at the end of these instructions, could someone clarify the following: -that view.rhtml no longer exists? -that show.rhtml exists, with the following in it: <html> <body> <h1>Friends#view</h1> <p>this page will display one friend</p> <p> <%= @person.name %><br /> <%= @person.street1 %><br /> <%= @person.street2 %><br /> <%= @person.city %><br /> <%= @person.state %><br /> <%= @person.zip %><br /> <%= for phone in @person.phones %> <%= phone.phone %><br /> <%= end %> </p> <a href="/friends/list">List</a> <a href="/friends/destroy/<%=@person.id%>">Delete</a> </body> </html> -that a separate (from the ''def show'' method) ''def view'' method no longer exists in the friends_controller.rb file? thanks in advance for any clarifications. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---