I am running into a problem with to_json not rendering my virtual attributes
class Location < ActiveRecord::Base belongs_to :event before_create :g
Simply implement #to_json yourself then:
class Location < ActiveRecord::Base def to_json(options={}) options[:methods] ||= [] options[:methods] << :event_oid super(options) end end