Sha256: c706e757704f408f7d4054f745508627f4f5cfd725a8a30e7f49348d48752052
Contents?: true
Size: 771 Bytes
Versions: 9
Compression:
Stored size: 771 Bytes
Contents
class ActiveadminJobs::InstallGenerator < Rails::Generators::Base def add_javascripts file_path = "app/assets/javascripts/active_admin.js.coffee" line_to_add = "#= require activeadmin_jobs/base\n" reference = "#= require active_admin/base\n" inject_into_file(file_path, line_to_add, after: reference) end def add_stylesheets file_path = 'app/assets/stylesheets/active_admin' line_to_add = "@import \"activeadmin_jobs/base\";\n" reference = "@import \"active_admin/base\";\n" inject_into_file("#{file_path}.scss", line_to_add, after: reference) rescue Errno::ENOENT inject_into_file("#{file_path}.css.scss", line_to_add, after: reference) end def run_job_notifier_generator generate("job_notifier:install") end end
Version data entries
9 entries across 9 versions & 1 rubygems