Updating my project to rails 2.3.8 and the latest ActiveScaffold.
However, this has broken some of my controllers and I can't figure out
why.
I have a Project model that used to use the following controllers.
ProjectsController (non AS, used for a myriad of purposes including
Project Creation and Edit forms, those required more customization
than I could handle in AS)
AjaxController (AS, main view for Projects)
ProposalsController (AS, specialized view of some of Projects, limited
by user, meant to be updated frequently without the hassle of having
to edit the entire document)
These worked great before the update, now not so much.
I'm getting this error, when I try to Show or Edit in the
ProposalsController.
<code>
Processing ProposalsController#edit (for 127.0.0.1 at 2010-10-28
11:38:47) [GET]
Parameters: {"action"=>"edit", "_method"=>"get",
"adapter"=>"_list_inline_adapter", "id"=>"5687",
"controller"=>"proposals"}
Project Load (0.7ms) SELECT * FROM `projects` WHERE (`projects`.`id`
= 5687)
ActionView::TemplateError (ProjectsController missing ActiveScaffold)
on line #14 of vendor/plugins/active_scaffold/frontends/default/views/
_form.html.erb:
11: </li>
12: <% else -%>
13: <li class="form-element <%= 'required' if column.required? %> <
%= column.css_class unless column.css_class.nil? %>">
14: <%= render :partial =>
form_partial_for_column(column), :locals => { :column => column } -%>
15: </li>
16: <% end -%>
17: <% end -%>
vendor/plugins/active_scaffold/frontends/default/views/
_form.html.erb:14
vendor/plugins/active_scaffold/frontends/default/views/
_form.html.erb:2
vendor/plugins/active_scaffold/frontends/default/views/
_update_form.html.erb:45
Rendered rescues/_trace (120.5ms)
Rendered rescues/_request_and_response (1.7ms)
Rendering rescues/layout (internal_server_error)
</code>
I've seen a few posts about using active_scaffold_controller_for and
using it in the ProposalsController does allow me to use show/edit.
Is this the right approach to use in my case? Maybe to make things
easier for future users we should add a decorator for a Controller
("active_scaffold_for :project") to make it easier to setup corner
cases like this? Or is there something else I'm doing wrong?
--
You received this message because you are subscribed to the Google Groups
"ActiveScaffold : Ruby on Rails plugin" 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/activescaffold?hl=en.