Module: AddressesHelper

Defined in:
app/helpers/addresses_helper.rb

Overview

Copyright © 2008-2013 Michael Dvorkin and contributors.

Fat Free CRM is freely distributable under the terms of MIT license. See MIT-LICENSE file or www.opensource.org/licenses/mit-license.php


Instance Method Summary collapse

Instance Method Details

#get_address(asset, type) ⇒ Object

Sets up new address when used in forms.




9
10
11
12
# File 'app/helpers/addresses_helper.rb', line 9

def get_address(asset, type)
  asset.send("build_#{type}".to_sym) if asset.send(type.to_sym).nil?
  asset.send(type.to_sym)
end

#priority_countriesObject



14
15
16
# File 'app/helpers/addresses_helper.rb', line 14

def priority_countries
  Setting[:priority_countries]
end