i18n_page_title - Auto generation some page title.

i18n_page_title is page title generator by i18n.
You can write all page title by the yaml file for i18n if you use this pulgin.
Page title is generated by an action name.
Example here.

# app/helper/application_helper.rb
module ApplicationHelper
  include I18nPageTitleHelper


# app/views/layouts/application.html.erb
<!DOCTYPE html>
    <title><%= page_title %> - Kint</title>
    <%= stylesheet_link_tag :all %>
    <%= javascript_include_tag :defaults %>
    <%= csrf_meta_tag %>

    <h1><%= page_title %></h1>
    <p id="notice"><%= notice %></p>

    <%= yield %>



# config/locals/en.yml
      show: show
      new: create
      create: create
      edit: update
      update: update
      destory: destroy
    user_sessions_title: user session
      new: login
    users_title: account info

Generation rule here.

Action name: Page title
User#show: account info show
User#create: account info create
UserSession#new: login

Ruby Advent Calendar 2010 jp-en

This entry is for Ruby Advent Calendar jp-en: 2010 : ATND.
The previous post was from ujihisa(Sorry not to write the entry that related to GC).