current_template

Rails plugin for displaying name of the current template file

MIT License

Downloads
8K
Stars
4
Committers
1

CurrentTemplate

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

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