Class: indra::ApplicationController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- indra::ApplicationController
- Defined in:
- app/controllers/jindra_engine/application_controller.rb
Overview
class ApplicationController < ActionController::Base
Instance Method Summary collapse
Instance Method Details
#prepare_meta_tags(options = {}) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'app/controllers/jindra_engine/application_controller.rb', line 7 def (={}) site_name = DEFAULT_TITLE title = [controller_name, action_name].join(" ") description = DEFAULT_DESCRIPTION image = [:image] || href="/assets/images/logo.png" keywords = DEFAULT_KEYWORDS current_url = request.url # Let's prepare a nice set of defaults defaults = { site: site_name, title: title, image: image, description: description, keywords: keywords, twitter: { site_name: site_name, site: site_name, card: 'summary', description: description, image: image }, og: { url: current_url, site_name: site_name, title: title, image: image, description: description, type: 'website' } } .reverse_merge!(defaults) # set_meta_tags options end |