Sha256: 45033614b88837d9872962dcb1c8e36b160a001e439bc862839de7ac02e0e688

Contents?: true

Size: 604 Bytes

Versions: 5

Compression:

Stored size: 604 Bytes

Contents

require 'rails/generators/rails/scaffold/scaffold_generator'

module Goma
  module Generators
    module Scaffold
      class OAuthGenerator < Rails::Generators::ScaffoldGenerator
        @namespace      = 'goma:scaffold:oauth'
        @generator_name = 'oauth'

        def initialize(args, *options)
          options[0] << '--controller-type=oauth'
          super
        end

        hook_for :orm, required: true, in: 'goma:model:oauth'

        hook_for :resource_route,      required: true, in: 'goma'
        hook_for :scaffold_controller, required: true, in: 'goma'
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
goma-0.0.1.rc3 lib/generators/goma/scaffold/oauth_generator.rb
goma-0.0.1.rc2 lib/generators/goma/scaffold/oauth_generator.rb
goma-0.0.1.rc1 lib/generators/goma/scaffold/oauth_generator.rb
goma-0.0.1.gamma lib/generators/goma/scaffold/oauth_generator.rb
goma-0.0.1.beta lib/generators/goma/scaffold/oauth_generator.rb