Sha256: 18c7a28f3709ab60f0bedc9692e2c284c8be004dcae1afa636a649e71120de74

Contents?: true

Size: 812 Bytes

Versions: 12

Compression:

Stored size: 812 Bytes

Contents

# encoding: utf-8

class FormtasticGenerator < Rails::Generator::Base

  def manifest
    record do |m|
      m.directory File.join('config', 'initializers')
      m.template 'formtastic.rb',   File.join('config', 'initializers', 'formtastic.rb')

      m.directory File.join('public', 'stylesheets')
      m.template 'formtastic.css',   File.join('public', 'stylesheets', 'formtastic.css')
      m.template 'formtastic_changes.css',   File.join('public', 'stylesheets', 'formtastic_changes.css')
    end
  end

  protected

  def banner
    %{Usage: #{$0} #{spec.name}\nCopies formtastic.css and formtastic_changes.css to public/stylesheets/ and a config initializer to config/initializers/formtastic.rb}
  end
  
  def source_root
    File.expand_path('../../../lib/generators/templates', __FILE__)
  end

end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
formtastic-1.2.5 generators/formtastic/formtastic_generator.rb
formtastic-1.2.4 generators/formtastic/formtastic_generator.rb
formtastic-1.2.4.beta2 generators/formtastic/formtastic_generator.rb
formtastic-1.2.3 generators/formtastic/formtastic_generator.rb
formtastic-1.2.3.beta generators/formtastic/formtastic_generator.rb
formtastic-1.2.2 generators/formtastic/formtastic_generator.rb
formtastic-1.2.1 generators/formtastic/formtastic_generator.rb
formtastic-1.2.1.beta3 generators/formtastic/formtastic_generator.rb
formtastic-1.2.1.beta generators/formtastic/formtastic_generator.rb
formtastic-1.2.0 generators/formtastic/formtastic_generator.rb
formtastic-1.2.0.beta2 generators/formtastic/formtastic_generator.rb
formtastic-1.2.0.beta generators/formtastic/formtastic_generator.rb