Skip to content

Rails plugin for displaying name of the current template file

License

Notifications You must be signed in to change notification settings

shihokambara/current_template

Repository files navigation

CurrentTemplate

Gem Version Dependency Status

Display name of the current template file, including partial template.

Demo

demo

Feature

This gem inspects log/development.log and gets partial name from it! It doesn't override any method.

This gem also supports haml and slim.

Installation

Add this line to your application's Gemfile:

group :development do
  gem install 'current_template'
end

And then add this line to app/view/layout/application.html.erb

<% if Rails.env == 'development' %>
  <%= show_current_template %>
<% end %>

License

The gem is available as open source under the terms of the MIT License.

Author

shiho kambara