Class: Revert::Layout
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Revert::Layout
- Defined in:
- lib/thesilverspoon.rb
Overview
If you use the NamedBase inheritance, a ‘name’ parameter has to follow the ‘rails g integratedscaffold’. Won’t work otherwise. If you don’t want this, use ::Base
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(*args, &block) ⇒ Layout
constructor
A new instance of Layout.
Constructor Details
#initialize(*args, &block) ⇒ Layout
Returns a new instance of Layout.
363 364 365 366 367 368 |
# File 'lib/thesilverspoon.rb', line 363 def initialize(*args, &block) super remove_file "app/views/layouts/application.html.erb" template "#{Layout.source_root}/layouts/general_layout.html.erb",'app/views/layouts/application.html.erb' end |
Class Method Details
.source_root ⇒ Object
360 361 362 |
# File 'lib/thesilverspoon.rb', line 360 def self.source_root File.("../templates", __FILE__) end |