Sha256: 3c68577a8bd1ac3447ad1cc1bf7a4d1c4d0b99f115e25b68786053fc7544d70a
Contents?: true
Size: 663 Bytes
Versions: 3
Compression:
Stored size: 663 Bytes
Contents
require 'merb/generators/merb_generator_helpers' class ResourceControllerGenerator < Merb::GeneratorHelpers::ControllerGeneratorBase def initialize(*args) puts args.inspect 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
3 entries across 3 versions & 1 rubygems