lib/potassium/templates/application/recipes/admin.rb in potassium-1.3.4 vs lib/potassium/templates/application/recipes/admin.rb in potassium-1.3.5

- old
+ new

@@ -2,16 +2,16 @@ if selected?(:authentication, :devise) gather_gem 'activeadmin', github: 'activeadmin' gather_gem 'activeadmin_addons' gather_gem 'active_skin' - after(:gem_install, :wrap_in_action => :admin_install) do + after(:gem_install, wrap_in_action: :admin_install) do generate "active_admin:install" line = "ActiveAdmin.setup do |config|" initializer = "config/initializers/active_admin.rb" - gsub_file initializer, /(#{Regexp.escape(line)})/mi do |match| + gsub_file initializer, /(#{Regexp.escape(line)})/mi do |_match| <<-HERE.gsub(/^ {11}/, '') class CustomFooter < ActiveAdmin::Component def build super(id: "footer") para "Powered by Platanus" @@ -23,16 +23,12 @@ end line = "@import \"active_admin/base\";" style = "app/assets/stylesheets/active_admin.css.scss" - style = if File.exist?(style) - style - else - "app/assets/stylesheets/active_admin.scss" - end + style = File.exist?(style) ? style : "app/assets/stylesheets/active_admin.scss" - gsub_file style, /(#{Regexp.escape(line)})/mi do |match| + gsub_file style, /(#{Regexp.escape(line)})/mi do |_match| <<-HERE.gsub(/^ {11}/, '') #{line} $skinActiveColor: #001CEE; $skinHeaderBck: #002744; $panelHeaderBck: #002744;