lib/sudo_attributes.rb in sudo_attributes-1.0.1 vs lib/sudo_attributes.rb in sudo_attributes-1.0.2
- old
+ new
@@ -1,8 +1,6 @@
module SudoAttributes
- extend ActiveSupport::Concern
-
module ClassMethods
# Creates an object (or multiple objects) with protected attributes and saves it to the database, if validations pass.
# The resulting object is returned whether the object was saved successfully to the database or not.
#
# The +attributes+ parameter can be either be a Hash or an Array of Hashes. These Hashes describe the
@@ -101,6 +99,7 @@
end
end
end
end
-ActiveRecord::Base.send(:include, SudoAttributes)
+ActiveRecord::Base.send(:include, SudoAttributes::InstanceMethods)
+ActiveRecord::Base.extend SudoAttributes::ClassMethods