Module: HasUuid::ActiveRecord::Associations::Builder::SingularAssociation
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/has_uuid/active_record/associations/builder/singular_association.rb
Defined Under Namespace
Modules: RedefinedWriter
Class Method Summary collapse
Class Method Details
.included(base) ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/has_uuid/active_record/associations/builder/singular_association.rb', line 8 def self.included(base) if ::ActiveRecord::VERSION::STRING >= "4.1" base.extend RedefinedWriter base.class_eval do class << self alias_method_chain :define_writers, :uuid_args end end else base.class_eval do include RedefinedWriter alias_method_chain :define_writers, :uuid_no_args end end end |