Subject line states the question. I'm adding the following to an
ActiveRecord class:
The problem is that if I try to access this attribute in my controller ICode:class Institution < ActiveRecord::Base # list of associations has_and_belongs_to_many(:license_types) attr_accessor :tmp_license_types public def initialize(attributes = nil) super(attributes) @tmp_license_types = Array.new self.license_types.each { |lt| self.tmp_license_types << lt } end
keep getting a nil object error. Also, I tried calling
in my view an this extra attribute that I added is not being reported.Code:<%= debug(@institution) %>
Any ideas?
Thanks,
Steven




Bookmarks