class Tao::Generators::CoffeeGenerator
Attributes
page_id[R]
Public Instance Methods
create_coffee_file()
click to toggle source
# File lib/generators/tao/coffee/coffee_generator.rb, line 12 def create_coffee_file actions.each do |action| @page_id = [class_path, file_name, action].flatten.join('-') if (variants = options[:variants]).any? variants.each do |variant| template "coffee.erb", File.join("app/assets/javascripts", variant, name.pluralize, "#{action}_page.coffee") end else template "coffee.erb", File.join('app/assets/javascripts', name.pluralize, "#{action}_page.coffee") end end end