Sha256: 75417ceda229a278b420de0dcb5f704bbb60f1d6ef6253a06d377d822420ba1b

Contents?: true

Size: 584 Bytes

Versions: 35

Compression:

Stored size: 584 Bytes

Contents

require 'rails/generators/resource_helpers'
require 'rails/generators/rails/model/model_generator'

module Rails
  module Generators
    class ResourceGenerator < ModelGenerator # :nodoc:
      include ResourceHelpers

      hook_for :resource_controller, required: true do |controller|
        invoke controller, [ controller_name, options[:actions] ]
      end

      class_option :actions, type: :array, banner: "ACTION ACTION", default: [],
                             desc: "Actions for the resource controller"

      hook_for :resource_route, required: true
    end
  end
end

Version data entries

35 entries across 35 versions & 4 rubygems

Version Path
railties-5.0.7.2 lib/rails/generators/rails/resource/resource_generator.rb
railties-5.0.7.1 lib/rails/generators/rails/resource/resource_generator.rb
railties-5.0.7 lib/rails/generators/rails/resource/resource_generator.rb
railties-5.0.6 lib/rails/generators/rails/resource/resource_generator.rb
railties-5.0.6.rc1 lib/rails/generators/rails/resource/resource_generator.rb
railties-5.0.5 lib/rails/generators/rails/resource/resource_generator.rb
railties-5.0.5.rc2 lib/rails/generators/rails/resource/resource_generator.rb
railties-5.0.5.rc1 lib/rails/generators/rails/resource/resource_generator.rb
railties-5.0.4 lib/rails/generators/rails/resource/resource_generator.rb
railties-5.0.4.rc1 lib/rails/generators/rails/resource/resource_generator.rb
railties-5.0.3 lib/rails/generators/rails/resource/resource_generator.rb
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/gems/railties-5.0.2/lib/rails/generators/rails/resource/resource_generator.rb
railties-5.0.2 lib/rails/generators/rails/resource/resource_generator.rb
railties-5.0.2.rc1 lib/rails/generators/rails/resource/resource_generator.rb
autocompl-0.2.2 test/dummy/vendor/bundle/ruby/2.3.0/gems/railties-5.0.1/lib/rails/generators/rails/resource/resource_generator.rb
autocompl-0.2.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/railties-5.0.1/lib/rails/generators/rails/resource/resource_generator.rb
autocompl-0.2.0 test/dummy/vendor/bundle/ruby/2.3.0/gems/railties-5.0.1/lib/rails/generators/rails/resource/resource_generator.rb
autocompl-0.1.2 test/dummy/vendor/bundle/ruby/2.3.0/gems/railties-5.0.1/lib/rails/generators/rails/resource/resource_generator.rb
autocompl-0.1.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/railties-5.0.1/lib/rails/generators/rails/resource/resource_generator.rb
autocompl-0.1.0 test/dummy/vendor/bundle/ruby/2.3.0/gems/railties-5.0.1/lib/rails/generators/rails/resource/resource_generator.rb