I have a prod site that has:
has_many :data, :conditions => {:aasm => ‘active’)
I do not want to modify it as I do not want to break existing
functionality
Is there a way to overrride this at runtime?
I have a prod site that has:
has_many :data, :conditions => {:aasm => ‘active’)
I do not want to modify it as I do not want to break existing
functionality
Is there a way to overrride this at runtime?
I have a prod site that has:
has_many :data, :conditions => {:aasm => ‘active’)
I do not want to modify it as I do not want to break existing functionality
Is there a way to overrride this at runtime?
If it were me, I’d add…
has_many :all_data, :class_name => ‘Data’
If it were really me, I’d swap it around and make your pre-existing
relationship “active_data” but since that isn’t an option…
I have no idea if you can override it during run time, but the above
should work just as well.
-philip
class name is irrelevant I just need to know if I can override the
conditions.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs