I figured out what the problem was so I am posting it so if anyone else runs into it they will have an answer. I had many of my controllers listed in my routes file as map.resources :model which causes problems because many of the links (for sorting, or going to the next page of a multipage listing) use the action "update_table", and map.resources sets up only the standard restful actions. At least, I think that was the problem. Also note you may need to add that action to any before_filters you have set up with the :only => [:action] method.
The other problem I was having was due to one of my AS pages being map.root in my routes file. This causes a problem when sorting because it messes with the controller name in the URL. Sometimes it is listed, and sometimes it isn't. Example: http://www.nexusrpg.org/#universes:1:name:ASC might work once, but if you click on the name column to reverse the sort it fails until you add universes before the hash mark. All kinds of very off problems that went away as soon as I made that not be the root_url anymore. Carl On Mon, Jun 1, 2009 at 10:10 PM, Carl <[email protected]> wrote: > > For some of the pages using AS I'm having problems when I sort tables > by some column (it didn't seem to be every table at first, but now it > does). On my local machine I tried to go to this page, and I get this: > > http://0.0.0.0:3000/qualities#qualities:1:name:ASC > > ActionController::InvalidAuthenticityToken in > QualitiesController#update_table > > The log looks like this: > Processing QualitiesController#update_table (for 127.0.0.1 at > 2009-06-01 22:03:18) [POST] > Parameters: {"action"=>"update_table", "_method"=>"get", > "page"=>"1", "controller"=>"qualities", "sort"=>"name", > "sort_direction"=>"ASC"} > > ActionController::InvalidAuthenticityToken > (ActionController::InvalidAuthenticityToken): > > > Rendered rescues/_trace (37.4ms) > Rendered rescues/_request_and_response (0.3ms) > Rendering rescues/layout (unprocessable_entity) > > > > > > And when I try to go to the second page by clicking on the next page > link, I get this error: > > ActiveRecord::RecordNotFound in QualitiesController#show > > Processing QualitiesController#show (for 127.0.0.1 at 2009-06-01 > 22:04:05) [GET] > Parameters: {"action"=>"show", > "authenticity_token"=>"C7c2JDdr4u058GRYpQSu69xSP+HqHjnHfIuN4DDbY9U=", > "id"=>"update_table", "page"=>"2", "controller"=>"qualities"} > User Load (0.3ms) SELECT * FROM "users" WHERE ("users"."id" = 1) > Quality Load (0.1ms) SELECT * FROM "qualities" WHERE > ("qualities"."id" = 0) > > ActiveRecord::RecordNotFound (Couldn't find Quality with > ID=update_table): > > > Rendered rescues/_trace (34.5ms) > Rendered rescues/_request_and_response (0.3ms) > Rendering rescues/layout (not_found) > > Carl > > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
