Class: Hancock::Cms::AssetsGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/generators/hancock/cms/assets_generator.rb

Instance Method Summary collapse

Instance Method Details

#application_coffee_pathObject



23
24
25
# File 'lib/generators/hancock/cms/assets_generator.rb', line 23

def application_coffee_path
  "javascripts/application.coffee"
end

#application_sass_pathObject



19
20
21
# File 'lib/generators/hancock/cms/assets_generator.rb', line 19

def application_sass_path
  "stylesheets/application.sass"
end

#assets_filesObject



27
28
29
30
31
32
33
# File 'lib/generators/hancock/cms/assets_generator.rb', line 27

def assets_files
  [
    rails_admin_theming_sass_path,
    application_sass_path,
    application_coffee_path
  ]
end

#installObject



8
9
10
11
12
# File 'lib/generators/hancock/cms/assets_generator.rb', line 8

def install
  assets_files.each do |f|
    template "#{f}.erb", "app/assets/#{f}"
  end
end

#rails_admin_theming_sass_pathObject



15
16
17
# File 'lib/generators/hancock/cms/assets_generator.rb', line 15

def rails_admin_theming_sass_path
  "stylesheets/hancock/rails_admin/custom/theming.sass"
end