Displaying 1 result from an estimated 1 matches for "1col_admin".
2008 May 17
1
Scope Confusion - Controller iVars in Modules
...would be something like this. I require
the file in application.rb.
module EventControls
def change_test_var
@test_var = ''y''
end
end
class UsersAdminController < ApplicationController
include EventControls
layout ''1col_admin''
attr_accessor :test_var
def some_action
@test_var = ''x''
change_test_var
end
end
Using debug(@test_var) the value doesn''t ever appear to change from ''x''
Confused...
-- gw
--~--~---------~--~----~--------...