On Apr 7, 6:25 pm, Harry Svensson <li...@ruby-forum.com> wrote:
> (in routes.rb)
>
> map.connect 'A', :controller => 'B', :action => 'C'
>
> I am not the king of the djungle - but I did find this information on
> the web and I suppose that I make a function in controller called "B"
> and then on page A where the form is I have "action='C'" so they are
> connected - but this is just pure speculations because I have no idea
> what so ever. this is pure guesses - can anyone please tell me if I'm
> correct or anything at all?
>

That means that a http request to http://yourserver/A should be routed
to the action called C (ie a method called C) in the controller called
B.
Your form action would be /A (since form actions are urls or paths.

There are some intricacies in routing, but in a nutshell it is the
process of decided which controller should handle an incoming web
request

I have to say that the approach you've got seems a little far fetched
- Why display the comments one by one in this fashion rather than have
them all on page to begin with?
You might want to take a look at the getting started guide at
http://guides.rubyonrails.org/getting_started.html - it covers created
a basic blog post & comments app

Fred
Fred



Fred
> --
> Posted viahttp://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@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to