Module: Themes::Default::DefaultHelper
- Defined in:
- app/apps/themes/default/default_helper.rb
Class Method Summary collapse
Instance Method Summary collapse
- #get_taxonomy(taxonomies = {}, rel = '') ⇒ Object
- #theme_default_load_app ⇒ Object
- #theme_default_on_install(theme) ⇒ Object
- #theme_default_settings(theme) ⇒ Object
Class Method Details
.included(klass) ⇒ Object
4 5 6 7 8 |
# File 'app/apps/themes/default/default_helper.rb', line 4 def self.included(klass) klass.helper_method [:get_taxonomy] rescue StandardError '' end |
Instance Method Details
#get_taxonomy(taxonomies = {}, rel = '') ⇒ Object
14 15 16 17 18 19 20 21 22 |
# File 'app/apps/themes/default/default_helper.rb', line 14 def get_taxonomy(taxonomies = {}, rel = '') list = [] if taxonomies.present? taxonomies.each do |taxonomy| list << "<a href='#{taxonomy.the_url}' rel='#{rel}'>#{taxonomy.the_title}</a>" end end list.join(', ') end |
#theme_default_load_app ⇒ Object
10 |
# File 'app/apps/themes/default/default_helper.rb', line 10 def theme_default_load_app; end |
#theme_default_on_install(theme) ⇒ Object
24 25 26 27 28 |
# File 'app/apps/themes/default/default_helper.rb', line 24 def theme_default_on_install(theme) theme.add_field({ 'name' => 'Footer message', 'slug' => 'footer' }, { field_key: 'editor', default_value: 'Copyright © 2015 - Camaleon CMS. All rights reservated.' }) end |
#theme_default_settings(theme) ⇒ Object
12 |
# File 'app/apps/themes/default/default_helper.rb', line 12 def theme_default_settings(theme); end |