Add this line to your application's Gemfile:
gem 'interage-helpers', '~> 0.1.1'And then execute:
bundle installOr install it yourself as:
gem install interage-helpersYou can use a Rails generator to create ApplicationHelper and add locales file:
rails g interage:helpers:installIf you want to overwrite some variables:
### APPLICATION HELPER
## Interage::ApplicationHelpers
#
APP_NAME='Nome da Aplicação'
ENV_NAME='development'
PREFIX_ADMIN_PAGE_TITLE='Administração :: '
PREFIX_DEVISE_PAGE_TITLE='Autenticação :: '
## Interage::ApplicationIconHelper
#
# Use 'fa' or 'md'
DEFAULT_FONT_ICON='fa'
## Interage::CocoonHelper
#
DEFAULT_BTN_TYPE_CLASS='btn btn-sm btn-outline-'
## Interage::ControllerActiveHelper
#
CONTROLLER_SHOW_CLASS='show'
CONTROLLER_ACTIVE_CLASS='active'
## Interage::FaviconHelper
#
FAVICON_EXTENTION='png'
FAVICON_FILE_NAME='icons/apple-touch-icon'<%= link_to_edit edit_user_path(user) %>
<%= link_to_back :back %>
<%= link_to_show user_path(user) %>
<%= link_to_destroy user_path(user) %>
<%= link_to_new User, users_path %><%= app_icon('user', class: 'text-muted') %>
<%= app_icon_text('users', 'Usuários', class: 'text-muted') %><%= fa_icon('user', class: 'text-muted') %>
<%= fa_icon_text('users', 'Usuários', class: 'text-muted') %><%= md_icon('user', class: 'text-muted') %>
<%= md_icon_text('users', 'Usuários', class: 'text-muted') %><%= app_version %>
<%= app_text_version %><%= tm(User) %>
<%= tmp(User) %>
<%= ta(User, :name) %>
<%= tb(false) %>
<%= tb(true) %>
<%= tbi(false) %>
<%= tbi(true) %>
<%= tbci(false) %>
<%= tbci(true) %><%= nl2br("Hello\nWorld") %><%= format_phone('+5581987654321') %>
<%= format_phone('5581987654321') %>
<%= format_phone('081987654321') %>
<%= format_phone('81987654321') %>
<%= format_phone('8187654321') %>
<%= format_phone('987654321') %>
<%= format_phone('98765432') %><%= pagination_links(@users) %><%= default_currency_format(10.57) %>
<%= default_currency_format(100.17) %>
<%= default_currency_format(1_000) %>
<%= default_currency_format(10_000) %>
<%= default_currency_format(1_000_000) %><%= gravatar_image_tag(user.email) %><%= current_controller?('home') %>
<%= current_controller?('docs') %>
<%= menu_class_show('docs') %>
<%= menu_active('docs') %>
<%= current_controller?('home', 'docs') %>
<%= menu_class_show('home', 'docs') %>
<%= menu_active('home', 'docs') %><%= format_cep('54754-195') %>
<%= format_cep('54754195') %><%= format_cnpj('08.475.876/0001-04') %>
<%= format_cnpj('08475876000104') %><%= format_cpf('320.871.430-05') %>
<%= format_cpf('32087143005') %><%= format_seconds(20) %>
<%= admin_page_title %>
<%= devise_page_title %>
<%= page_title %>
<%= app_name %>
<%= env_name_upcase %><%= bs_alert_info('Info message') %>
<%= bs_alert_warning('Warning message') %>
<%= bs_alert_success('Success message') %>
<%= bs_alert_danger('Danger message') %>
<%= bs_alert_not_found_male(User) %>
<%= bs_alert_not_found_female(User) %>
<%= text_not_found_male(User) %>
<%= text_not_found_female(User) %>Bug reports and merge requests are welcome on GitLab at https://gitlab.com/[USERNAME]/interage-helper.