I have some code that works when logged_in but not when not logged_in. The
switch_theme action just changes the variable controlling the CSS stylesheet
and does a ''redirect_to :back''. But no other action is
called. The log looks
like below. Ring any bells?
TIA,
Jeffrey
Non-working:
Processing ApplicationController#switch_theme (for 127.0.0.1 at 2010-03-21
03:20:53) [GET]
Parameters: {"action"=>"switch_theme",
"controller"=>"application"}
User Columns (1.6ms) SHOW FIELDS FROM `users`
User Load (0.6ms) SELECT * FROM `users` WHERE (`users`.`login` =
''Jeff'') LIMIT 1
Redirected to http://127.0.0.1:3000/items
Completed in 31ms (DB: 17) | 302 Found [http://127.0.0.1/switch_theme]
=========================================================================Working:
Processing ApplicationController#switch_theme (for 127.0.0.1 at 2010-03-21
03:31:17) [GET]
Parameters: {"action"=>"switch_theme",
"controller"=>"application"}
User Columns (1.8ms) SHOW FIELDS FROM `users`
User Load (0.6ms) SELECT * FROM `users` WHERE (`users`.`login` =
''Jeff'') LIMIT 1
User Load (0.5ms) SELECT * FROM `users` WHERE (`users`.`id` =
''1'') LIMIT 1
SQL (0.1ms) BEGIN
User Update (0.5ms) UPDATE `users` SET `updated_at` = ''2010-03-21
08:31:17'', `perishable_token` =
''PE2oMoDx2BDp58azOFPx'', `last_request_at` =
''2010-03-21 08:31:17'' WHERE `id` = 1
SQL (10195.9ms) COMMIT
SQL (0.3ms) BEGIN
User Update (0.7ms) UPDATE `users` SET `updated_at` = ''2010-03-21
08:31:27'', `perishable_token` =
''9gNKIRTV7FdKYa-To9XQ'', `theme` = 1 WHERE `id` = 1
SQL (829.0ms) COMMIT
Redirected to http://127.0.0.1:3000/articles
Completed in 11108ms (DB: 11042) | 302 Found [http://127.0.0.1/switch_theme]
SQL (5.9ms) SET NAMES ''utf8''
SQL (0.1ms) SET SQL_AUTO_IS_NULL=0
Processing ArticlesController#index (for 127.0.0.1 at 2010-03-21 03:31:28) [GET]
Parameters: {"action"=>"index",
"controller"=>"articles"}
User Columns (1.7ms) SHOW FIELDS FROM `users`
User Load (0.5ms) SELECT * FROM `users` WHERE (`users`.`login` =
''Jeff'') LIMIT 1
User Load (0.5ms) SELECT * FROM `users` WHERE (`users`.`id` =
''1'') LIMIT 1
SQL (0.3ms) BEGIN
User Update (0.4ms) UPDATE `users` SET `updated_at` = ''2010-03-21
08:31:28'', `perishable_token` =
''QFCwPhX4OCZ4EmLj7Q6f'', `last_request_at` =
''2010-03-21 08:31:28'' WHERE `id` = 1
SQL (52.3ms) COMMIT
Feed Load (0.8ms)
.....
--
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
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.