The problem was with a monkey patch in lib for ActiveScaffold::Actions::Update#do_update_column. As it happens, the monkey patch is not actually needed so I removed it and now the edit and update actions work.
It appears that the change of behavior was introduced by the change to lib/active_scaffold.rb in <http://github.com/activescaffold/ active_scaffold/commit/156fd15c849846138c4b18d4b2bbcafcef8dddf0>, as the version of AS in the project that is working with 2.1 predates that commit. So, watch out for monkey patching. On Jan 28, 11:19 am, David C <[email protected]> wrote: > Not much to them. Even this rather basic controller does not allow > editing, but does allow all the other AS actions. Other controllers > have more columns than this one or disable certain actions, but are > otherwise similar. > > class Admin::StatusController < AdministrationController > > active_scaffold :status do |config| > config.columns = [ :name, :description ] > config.columns[:name].label = 'Status' > config.columns[:description].form_ui = :textarea > end > > end > > On Jan 28, 6:57 am, Mike Gaffney <[email protected]> wrote: > > > Shouldn't be. Could you post a controller? > > > David C wrote: > > > I'm trying to upgrade a previously working project from Rails 2.1 to > > > 2.2. I pulled the rails-2.2 branch of AS and all the AS functionality > > > is working except for editing. All the other actions -- list, show, > > > new/create, delete, search, sort, etc. -- work, but an attempt to edit > > > results in an UnknownAction error (this particular error is from a > > > controller that excludes the create and delete actions, which is why > > > they're not listed in the error message, but the update method is not > > > excluded): > > > > ActionController::UnknownAction (No action responded to edit. Actions: > > > attributes_hash_is_empty?, do_update_column, edit_associated, > > > find_or_create_for_params, index, list, nested, row, show, > > > show_search, table, update_record_from_params, and update_table): > > > > I traced through the AS initialization code and verified that > > > ActiveScaffold::Actions::Update is supposedly being included when the > > > controller is loaded (update is included in > > > active_scaffold_config.actions), yet the edit and update methods are > > > not accessible. The problem exists with all of my AS-enabled > > > controllers, not just one or a few of them. > > > > I am using RESTful routing (with :active_scaffold => true for the > > > relevant routes), but that doesn't seem to be the problem as all the > > > other actions are functioning and I verified that the expected routes > > > are generated. > > > > Again, this worked with 2.1 and only fails with 2.2. Is there some > > > required change I've overlooked? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
