Class: HackCardsGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/generators/hack_cards/hack_cards_generator.rb

Overview

railscast 218

Instance Method Summary collapse

Instance Method Details

#generate_partialsObject



17
18
19
# File 'lib/generators/hack_cards/hack_cards_generator.rb', line 17

def generate_partials
  template "card.html.erb", "app/views/layouts/card.html.erb"
end

#generate_stylesheetsObject

all public methods inside a generator will be executed when you call the generator



13
14
15
# File 'lib/generators/hack_cards/hack_cards_generator.rb', line 13

def generate_stylesheets
  copy_file "stylesheet.scss", "app/assets/stylsheets/#{layout_name}.scss"
end