Class: ApplicationController
- Inherits:
-
ActionController::Base
- Object
- ActionController::Base
- ApplicationController
- Defined in:
- lib/generators/jinda/templates/app/controllers/jinda_org/application_controller.rb
Direct Known Subclasses
AdminsController, Api::V1::NotesController, ArticlesController, CommentsController, DocsController, IdentitiesController, JindaController, NotesController, PasswordResetsController, SessionsController, SitemapController, UsersController
Instance Method Summary collapse
Instance Method Details
#prepare_meta_tags(options = {}) ⇒ Object
5 6 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 |
# File 'lib/generators/jinda/templates/app/controllers/jinda_org/application_controller.rb', line 5 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) end |