Module: ActiveUrl::Validations::ClassMethods
- Defined in:
- lib/active_url/validations.rb
Instance Method Summary collapse
- #find_with_validation(id) ⇒ Object
- #human_attribute_name(name, options = {}) ⇒ Object
- #human_name ⇒ Object
- #self_and_descendants_from_active_record ⇒ Object (also: #self_and_descendents_from_active_record)
Instance Method Details
#find_with_validation(id) ⇒ Object
24 25 26 27 28 |
# File 'lib/active_url/validations.rb', line 24 def find_with_validation(id) active_url = find_without_validation(id) raise ActiveUrl::RecordNotFound unless active_url.valid? active_url end |
#human_attribute_name(name, options = {}) ⇒ Object
20 21 22 |
# File 'lib/active_url/validations.rb', line 20 def human_attribute_name(name, = {}) name.to_s.humanize end |
#human_name ⇒ Object
17 18 |
# File 'lib/active_url/validations.rb', line 17 def human_name() end |
#self_and_descendants_from_active_record ⇒ Object Also known as: self_and_descendents_from_active_record
12 13 14 |
# File 'lib/active_url/validations.rb', line 12 def self_and_descendants_from_active_record [self] end |