Sha256: 84723b1cf4a9e701d8f0a725714d3cb53f13b1a673b46f223bca13151b5b41c0

Contents?: true

Size: 632 Bytes

Versions: 3

Compression:

Stored size: 632 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 Sequel Models

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

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
merb_sequel-0.4.2 sequel_generators/resource_controller/resource_controller_generator.rb
merb_sequel-0.5 sequel_generators/resource_controller/resource_controller_generator.rb
merb_sequel-0.4.3 sequel_generators/resource_controller/resource_controller_generator.rb