You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 13, 2022. It is now read-only.
Tire ( http://github.com/karmi/tire ) exports ".indexes" on models it's mixed into, as does schema_plus. I'm not sure of a fix here - ideas? Tire makes its methods available under the ".tire" method proxy, so you can call "Model.tire.indexes" as well.
The text was updated successfully, but these errors were encountered:
Can't say that I have any simple immediately bright ideas. Externally, you could define your own methods to call one or the other using something along the lines of
def ActiveRecord::Base.schema_plus_indexes
SchemaPlus::ActiveRecord::Base.method(:indexes).bind(self).()
end
and likewise for Tire. but that wouldn't help with either gem's use of its own indexes method internally.
Only solution I can think of would be to change schema_plus to define and use a method schema_plus_indexes everywhere internally and provide indexes as an alias to schema_plus_indexes, and do likewise in Tire. That way the internals wouldn't collide, and users of just one of the two could call .indexes as normal, but users of both would need to call schema_plus_indexes or tire_indexes, and/or could re-alias indexes to whichever one they use more often.
(Ruby 2.0's "refinements" would perhaps help with isolating such things for the internal uses, but doesn't address exporting AFAIK)
Tire ( http://github.com/karmi/tire ) exports ".indexes" on models it's mixed into, as does schema_plus. I'm not sure of a fix here - ideas? Tire makes its methods available under the ".tire" method proxy, so you can call "Model.tire.indexes" as well.
The text was updated successfully, but these errors were encountered: