Class: NoCms::Blocks::LayoutGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- NoCms::Blocks::LayoutGenerator
- Defined in:
- lib/generators/nocms/blocks/layout_generator.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.namespace ⇒ Object
23 24 25 |
# File 'lib/generators/nocms/blocks/layout_generator.rb', line 23 def self.namespace "nocms:blocks:layout" end |
Instance Method Details
#generate_initializer ⇒ Object
19 20 21 |
# File 'lib/generators/nocms/blocks/layout_generator.rb', line 19 def generate_initializer template "config/initializers/nocms/blocks/layout.rb", File.join(destination_root, "config/initializers/nocms/blocks", "#{name}.rb") end |
#generate_stylesheets ⇒ Object
9 10 11 |
# File 'lib/generators/nocms/blocks/layout_generator.rb', line 9 def generate_stylesheets template "app/assets/stylesheets/no_cms/blocks/layout.scss.erb", File.join(destination_root, "app/assets/stylesheets/no_cms/blocks", "_#{name}.scss") end |
#generate_views ⇒ Object
13 14 15 16 17 |
# File 'lib/generators/nocms/blocks/layout_generator.rb', line 13 def generate_views template "app/views/no_cms/blocks/blocks/layout.html.erb", File.join(destination_root, "app/views/no_cms/blocks/blocks", "_#{name}.html.erb") template "app/views/no_cms/admin/blocks/blocks/layout.html.erb", File.join(destination_root, "app/views/no_cms/admin/blocks/blocks", "_#{name}.html.erb") template "app/views/no_cms/blocks/skeletons/default.html.erb", File.join(destination_root, "app/views/no_cms/blocks/skeletons", "_#{name}.html.erb") end |