module RailsBand::ActionView::FromViews

FromViews provides a sole method from_views to delete the prefix of ‘app/views/’ from the passed string.

Private Instance Methods

from_views(string) click to toggle source
# File lib/rails_band/action_view/from_views.rb, line 9
def from_views(string)
  string.delete_prefix(views_prefix)
end
views_prefix() click to toggle source
# File lib/rails_band/action_view/from_views.rb, line 13
def views_prefix
  @views_prefix ||= Rails.root.join('app/views/').to_path
end