Class: Shelter

Inherits:
ActiveRecord::Base
  • Object
show all
Includes:
ActionView::Helpers::NumberHelper, CommonScopes, PublicActivity::Model
Defined in:
app/models/shelter.rb

Instance Method Summary collapse

Methods included from CommonScopes

included

Instance Method Details

#formatted_phoneObject


27
28
29
# File 'app/models/shelter.rb', line 27

def formatted_phone
  self.phone.blank? ? '' : number_to_phone(self.phone)
end

#modify_phone_numberObject


23
24
25
# File 'app/models/shelter.rb', line 23

def modify_phone_number
  self.phone = self.phone.delete('^0-9') unless self.phone.blank?
end