Sha256: 6f96aeeac438a0af066fce67d77c25f9d4f3a2ef10fe3484873f1372a55cff77

Contents?: true

Size: 643 Bytes

Versions: 11

Compression:

Stored size: 643 Bytes

Contents

require 'merb/generators/merb_generator_helpers'

class ResourceControllerGenerator < Merb::GeneratorHelpers::ControllerGeneratorBase

  def initialize(*args)
    runtime_options = args.last.is_a?(Hash) ? args.pop : {}
    name, *actions = args.flatten
    runtime_options[:actions] = %w[index show new edit]
    runtime_options[:test_stub_generator] = "merb_controller_test"
    super( [name], runtime_options )
  end

  def self.superclass
    RubiGen::Base
  end
  
  protected
  def banner
        <<-EOS
  Creates a Merb controller, views and specs using Active Record Models

  USAGE: #{$0} #{spec.name} resource_name"
  EOS
  end
  
end

Version data entries

11 entries across 11 versions & 3 rubygems

Version Path
merb-0.4.1 merb_default_generators/resource_controller/resource_controller_generator.rb
merb-0.5.0 merb_default_generators/resource_controller/resource_controller_generator.rb
merb-0.4.0 merb_default_generators/resource_controller/resource_controller_generator.rb
merb-0.4.2 merb_default_generators/resource_controller/resource_controller_generator.rb
merb-0.5.1 merb_default_generators/resource_controller/resource_controller_generator.rb
merb-0.5.2 merb_default_generators/resource_controller/resource_controller_generator.rb
merb-0.5.3 merb_default_generators/resource_controller/resource_controller_generator.rb
merb_activerecord-0.5 activerecord_generators/resource_controller/resource_controller_generator.rb
merb_activerecord-0.4.2 activerecord_generators/resource_controller/resource_controller_generator.rb
merb_active_record-0.4.0 active_record_generators/resource_controller/resource_controller_generator.rb
merb_activerecord-0.4.3 activerecord_generators/resource_controller/resource_controller_generator.rb