Class: Revert::Layout

Inherits:
Rails::Generators::Base
  • Object
show all
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

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_rootObject



360
361
362
# File 'lib/thesilverspoon.rb', line 360

def self.source_root
  File.expand_path("../templates", __FILE__)
end