On Sep 21, 8:18 am, "Commander Johnson" <[EMAIL PROTECTED]>
wrote:
> Where do I place my layout so I don't have to specify one explicitly?
> I got this line of code:
>
> <% form_for([:backend, @form]) do |f| %>
>
> From here:
>
> http://api.rubyonrails.org/classes/ActionView/Helpers/FormHelper.html...
>
> But still get the error
>
> undefined method `form_path' for #<ActionView::Base:0x1f25d83>
If you want all your controllers to use the same layout, you could
just define it at application.rb, like:
class ApplicationController
layout "mylayout"
...
end
Try this form_for construct:
<% form_for @form, :url => {:action => "update"} do |f| %>
Or for new records:
<% form_for @form, :url => {:action => "create"} do |f| %>
HTH
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---