= MetaManager Enable meta tags in your model == Install gem "meta_manager" ActiveRecord: require 'meta_manager/orm/active_record' rake meta_manager_engine:install:migrations Mongoid: require 'meta_manager/orm/mongoid' == Usage class Category < ActiveRecord::Base include MetaManager::Taggable end @category = Category.new @category.tag_title = 'category test title' @category.tag_keywords = "Some keywords" @category.tag_description = "Some description" @category.meta_tags.build(:name => "og:title", :content => 'category og:title') # create dynamic meta tags, who will be overwrited the same category tag names # only with @meta_dynamic=true in controller @category.meta_tags.build(:name => "og:title", :content => 'dynamic og:title - %{post.title}', :is_dynamic => true) @category.meta_tags.build(:name => "title", :content => '%{post.title} - %{post.notes}', :is_dynamic => true) @category.save # create post for dynamic example @post = Post.create(:title => 'post test title', :notes => 'post test notes') == Rendering example At layouts/application.html.erb
<%= raw(render_meta_tags(@category)) %>