Module: FrontKit::Base
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/frontkit-rails/base.rb
Instance Method Summary collapse
-
#frontend_state ⇒ Object
instance methods.
- #merge_frontend_state(hash) ⇒ Object
- #meta_tags_container ⇒ Object
- #push_frontend_state(key, value) ⇒ Object
- #push_meta_tag(hash) ⇒ Object
Instance Method Details
#frontend_state ⇒ Object
instance methods
19 20 21 22 23 24 25 |
# File 'lib/frontkit-rails/base.rb', line 19 def frontend_state @_frontend_state ||= FrontKit::State.new( production: Rails.env.production?, alert: alert, notice: notice ) end |
#merge_frontend_state(hash) ⇒ Object
31 32 33 |
# File 'lib/frontkit-rails/base.rb', line 31 def merge_frontend_state(hash) frontend_state.deep_merge!(hash) end |
#meta_tags_container ⇒ Object
35 36 37 |
# File 'lib/frontkit-rails/base.rb', line 35 def @_meta_tags_container ||= FrontKit::MetaContainer.new end |
#push_frontend_state(key, value) ⇒ Object
27 28 29 |
# File 'lib/frontkit-rails/base.rb', line 27 def push_frontend_state(key, value) frontend_state[key] = value end |
#push_meta_tag(hash) ⇒ Object
39 40 41 |
# File 'lib/frontkit-rails/base.rb', line 39 def (hash) .push(hash) end |