Displaying 1 result from an estimated 1 matches for "extra_attr".
Did you mean:
ext_attr
2006 Jan 13
6
rails bug ? metadata lost between page invocation ?
...s model and controller classes between
invocation, so that''s why the class variable has to be in a separate
class, one that won''t be reloaded between invocation)
Let me simply give a code example to show what I mean:
Here is the SimpleObj model (notice the new method ''extra_attr''):
# file app/models/simple_obj
class SimpleObj < ActiveRecord::Base
def extra_attr
"hello"
end
end
Here is the controller
# file app/controllers/my_test_controller.rb
class MyTestController < ApplicationController
def put...