Skip to content

Commit

Permalink
call strip_heredoc on injected routes for better indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
jcoyne committed Nov 6, 2015
1 parent b46a0af commit e3d812c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/generators/blacklight/controller_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def create_blacklight_catalog
end

def inject_blacklight_routes
route <<-EOF
route <<-EOF.strip_heredoc
concern :searchable, Blacklight::Routes::Searchable.new
resource :catalog, only: [:index], as: 'catalog', path: '/catalog', controller: 'catalog' do
Expand Down
2 changes: 1 addition & 1 deletion lib/generators/blacklight/models_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def copy_migrations
end

def add_routes
route <<-EOF
route <<-EOF.strip_heredoc
concern :exportable, Blacklight::Routes::Exportable.new
resources :solr_documents, only: [:show], path: '/catalog', controller: 'catalog' do
Expand Down
2 changes: 1 addition & 1 deletion lib/generators/blacklight/test_support_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class TestSupport < Rails::Generators::Base
def alternate_controller
copy_file "alternate_controller.rb", "app/controllers/alternate_controller.rb"

routing_code = <<-EOF
routing_code = <<-EOF.strip_heredoc
resource :alternate, controller: 'alternate', only: [:index] do
concerns :searchable
end
Expand Down

0 comments on commit e3d812c

Please sign in to comment.