Module: ActiveModel::SecureAttribute::ClassMethods
- Defined in:
- lib/active_model/secure_attribute/has_secure_attribute.rb
Instance Method Summary
collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(meth, *args, &block) ⇒ Object
13
14
15
16
17
18
19
|
# File 'lib/active_model/secure_attribute/has_secure_attribute.rb', line 13
def method_missing(meth, *args, &block)
if meth.to_s =~ /^has_secure_(.+)$/
has_secure_attribute($1, *args, &block)
else
super
end
end
|
Instance Method Details
#has_secure(attr, opts = {}) ⇒ Object
21
22
23
|
# File 'lib/active_model/secure_attribute/has_secure_attribute.rb', line 21
def has_secure(attr, opts={})
has_secure_attribute(attr, opts)
end
|