On 6 August 2014 07:39, Turcu Marius <[email protected]> wrote:
> Hi all! I'm new to Rails and i have some problems with this code.
>
> I have this form in a view of page controller
> <%= form_for Lesson.new do %>
> <%= label_tag(:number, "Enter the number") %>
>     <%= text_field_tag :number %>
>         <%= label_tag(:root, "root") %>
>         <%= text_field_tag :root %>
>     <%= submit_tag("Submit") %>
>         <% end %>
>
> In Lesson controller i've methods new create and soo on.
> I'm not sure how to use this form in another view.
> I have this error  undefined method `lessons_path'
> I repeat i'm new to rails, have 2 days:))

Perhaps you have not put an entry for lessons in routes.rb.

However I suggest that you work right through a good tutorial such as
railstutorial.org, (which is free to use online).  That will show you
the basics of Rails with much less pain than jumping in at the deep
end by yourself.

Colin

>
> --
> Posted via http://www.ruby-forum.com/.
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> To post to this group, send email to [email protected].
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/rubyonrails-talk/e3bc0a4a7d1e9eaa787ed9d63ef604aa%40ruby-forum.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/CAL%3D0gLsRC06mH%3DnH5s%2BKams68e4NdvUaTBLMAP4m5GNeuHdNWQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to