Sha256: 5ff951bc51e099e3f4dd432d0a02afda0b61311d42aad8e0e2c68048a81801c3

Contents?: true

Size: 641 Bytes

Versions: 2

Compression:

Stored size: 641 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 Datamapper Models

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

Version data entries

2 entries across 2 versions & 2 rubygems

Version Path
merb_datamapper-0.4.2 datamapper_generators/resource_controller/resource_controller_generator.rb
merb_data_mapper-0.4.0 data_mapper_generators/resource_controller/resource_controller_generator.rb