Thanks a lot Colin, that was my problem.

>From documentation I managed to make a working form_for:

<% form_for :student, @student, :url => { :action => "create" }, :html
=> { :method => :post, :id => "beiratkozok" }   do |f| %>

This works, but I don't understand why do I need the :student in the
front. What does it do?

On Apr 2, 11:18 pm, Colin Law <[email protected]> wrote:
> On 2 April 2010 21:00, WSzP <[email protected]> wrote:
>
> > You got me wrong. I can't put the create method in the student
> > controller.
> > The question if, how could I use the create method from the
> > BeiratkozasController class, while the model is NOT Beiratkozas, but
> > Student.
>
> Have a look at the docs for form_for, you will see it has a url
> parameter which will allow you to specify the controller and action
> that you wish to be performed on the submit.
>
> Colin

-- 
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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to