Hi, I would like to know if it is possible to remove the association in rails.
Well, I have something similar to this:
class Home < ActiveRecord::Base
include settings
end
In settings.rb, I have something similar to this
module Settings
attr_reader :person
attr_reader :address
def self.included(base)
base.belongs_to :city
base.belongs_to :entity
[...]
end
[...]
end
In the home class, the association of a city model in my particular case does not make sense. And I have to find a way to remove it in order to support my DRY code.
Thank!
NOTE. Give me feedback before you vote.
source
share