Displaying 1 result from an estimated 1 matches for "books_on".
Did you mean:
booklion
2006 Jan 31
0
adding an attribute to a ActiveRecord::Base instance
I have an instance of ActiveRecord::Base called Site. Is it possible to
add attributes to that class in code, like so
class Site < ActiveRecord::Base
belongs_to :user
attr_accessor :type_site_boolop, :type_program_boolop, :books_only
I don''t want those additional attributed in the DB. The problem is that
given
@site = Site.new
@site.type_site_boolop = ''foo''
@site.attributes does not include type_site_boolop. Any ideas?
Thanks again, I''m new too Rails and this forum has been most help...