Skip to content

Commit

Permalink
Cleanup hash rockets
Browse files Browse the repository at this point in the history
  • Loading branch information
bogdan committed Jan 22, 2024
1 parent d78c6b4 commit 4a338b5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/datagrid/scaffold.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ class Datagrid::Scaffold < Rails::Generators::NamedBase

include Rails::Generators::ResourceHelpers

check_class_collision :suffix => "Grid"
check_class_collision suffix: "Grid"
source_root File.expand_path(__FILE__ + "/../../../templates")

def create_scaffold
Expand All @@ -13,7 +13,7 @@ def create_scaffold
end
template "grid.rb.erb", "app/grids/#{grid_class_name.underscore}.rb"
if file_exists?(grid_controller_file)
inject_into_file grid_controller_file, index_action, :after => %r{class .*#{grid_controller_class_name}.*\n}
inject_into_file grid_controller_file, index_action, after: %r{class .*#{grid_controller_class_name}.*\n}
else
template "controller.rb.erb", grid_controller_file
end
Expand All @@ -30,7 +30,7 @@ def create_scaffold
}.each do |extension, string|
file = "app/assets/stylesheets/application.#{extension}"
if file_exists?(file)
inject_into_file file, string + "\n", {:before => %r{.*require_self}} # before all
inject_into_file file, string + "\n", {before: %r{.*require_self}} # before all
end
end
end
Expand Down

0 comments on commit 4a338b5

Please sign in to comment.