Module: Auth::Concerns::Shopping::PlaceConcern
- Extended by:
- ActiveSupport::Concern
- Includes:
- EsConcern, OwnerConcern
- Included in:
- Shopping::Place
- Defined in:
- app/models/auth/concerns/shopping/place_concern.rb
Defined Under Namespace
Modules: ClassMethods
Instance Method Summary collapse
- #get_address_from_details ⇒ Object
- #set_autocomplete_description ⇒ Object
- #set_autocomplete_tags ⇒ Object
-
#set_primary_link ⇒ Object
AUTOCOMPLETE METHODS.
- #set_secondary_links ⇒ Object
Instance Method Details
#get_address_from_details ⇒ Object
129 130 131 132 133 134 135 |
# File 'app/models/auth/concerns/shopping/place_concern.rb', line 129 def get_address_from_details address = "" [:unit_number,:building,:street,:city,:country_state,:country,:pin_code].each do |component| address += (" " + self.send(component).to_s) unless self.send(component).nil? end address end |
#set_autocomplete_description ⇒ Object
173 174 175 |
# File 'app/models/auth/concerns/shopping/place_concern.rb', line 173 def set_autocomplete_description end |
#set_autocomplete_tags ⇒ Object
168 169 170 171 |
# File 'app/models/auth/concerns/shopping/place_concern.rb', line 168 def self. = [] self. << "Place" end |
#set_primary_link ⇒ Object
AUTOCOMPLETE METHODS.
146 147 148 |
# File 'app/models/auth/concerns/shopping/place_concern.rb', line 146 def set_primary_link self.primary_link = Rails.application.routes.url_helpers.send(Auth::OmniAuth::Path.show_or_update_or_delete_path(Auth.configuration.place_class),self.id.to_s) end |
#set_secondary_links ⇒ Object
150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 |
# File 'app/models/auth/concerns/shopping/place_concern.rb', line 150 def set_secondary_links unless self.secondary_links["See All Carts"] end unless self.secondary_links["See Latest Cart"] end unless self.secondary_links["See Pending Carts"] end unless self.secondary_links["Edit Information"] end end |