I do not understand how to do 5.7 - Showing Posts.

44 views
Skip to first unread message

Ray Fitzgerald

unread,
Nov 2, 2013, 12:03:52 PM11/2/13
to rubyonra...@googlegroups.com

Can someone please explain this line:

Can someone please explain this line: .  Am i supposed to put in the command line? Am i supposed to put it in the create function, please help, I am struggling overall.



Rodrigo Rosenfeld Rosas

unread,
Nov 2, 2013, 2:35:09 PM11/2/13
to rubyonra...@googlegroups.com

This comes from the output of rake routes. This is not a command or valid Ruby code.

Em 02/11/2013 16:32, "Ray Fitzgerald" <razer...@gmail.com> escreveu:

Can someone please explain this line:

Can someone please explain this line: .  Am i supposed to put in the command line? Am i supposed to put it in the create function, please help, I am struggling overall.



--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Documentation" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-do...@googlegroups.com.
To post to this group, send email to rubyonra...@googlegroups.com.
Visit this group at http://groups.google.com/group/rubyonrails-docs.
For more options, visit https://groups.google.com/groups/opt_out.

Les Nightingill

unread,
Nov 2, 2013, 2:48:55 PM11/2/13
to rubyonra...@googlegroups.com
If you look at section 5. you'll see a line in the config/routes.rb file that looks like:
    resources :posts

This results in the creation of a bunch of routes related to the Post resource. They're listed right below, using the command line "rake routes" command.

In this list of routes, you'll see the route you asked about.

You don't have to enter these routes anywhere, they're generated by Rails when you declare the :posts resource.

Rodrigo Rosenfeld Rosas

unread,
Nov 2, 2013, 2:49:07 PM11/2/13
to rubyonra...@googlegroups.com

Sorry, I'm on the phone and it's hard to type here. Please check the routing guide in the meanwhile

Reply all
Reply to author
Forward
0 new messages