Class: Skr::Extension
- Inherits:
-
Lanes::Extensions::Definition
- Object
- Lanes::Extensions::Definition
- Skr::Extension
- Defined in:
- lib/skr/extension.rb
Instance Method Summary collapse
Instance Method Details
#client_bootstrap_data(view) ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/skr/extension.rb', line 15 def client_bootstrap_data(view) gl_accounts = Skr::GlAccount.all.as_json { default_gl_account_ids: Hash[ Skr.config.default_gl_accounts.map{ |code,number| account = gl_accounts.detect{|gla|gla['number'] == number} [code, account ? account['id'] : 0] }], gl_accounts: gl_accounts, payment_terms: Skr::PaymentTerm.all.as_json, locations: Skr::Location.all.as_json, templates: Skr::Print::Template.as_json } end |
#each_static_asset ⇒ Object
29 30 31 32 33 34 |
# File 'lib/skr/extension.rb', line 29 def each_static_asset super do | entry | yield entry end [ 'skr/api.js', 'skr/api.css' ].each { | asset | yield asset } end |