Sha256: 37690d2172fb703b53998018c2bbb9673cc28f8af40ca6f7e542fbb8d742ecec

Contents?: true

Size: 568 Bytes

Versions: 55

Compression:

Stored size: 568 Bytes

Contents

module DeviseInvitable
  module Generators
    class DeviseInvitableGenerator < Rails::Generators::NamedBase
      namespace "devise_invitable"

      desc "Add :invitable directive in the given model. Also generate migration for ActiveRecord"

      # def devise_generate_model
      #   invoke "devise", [name]
      # end

      def inject_devise_invitable_content
        path = File.join("app", "models", "#{file_path}.rb")
        inject_into_file(path, "invitable, :", :after => "devise :") if File.exists?(path)
      end

      hook_for :orm
    end
  end
end

Version data entries

55 entries across 55 versions & 1 rubygems

Version Path
devise_invitable-1.7.5 lib/generators/devise_invitable/devise_invitable_generator.rb
devise_invitable-1.7.4 lib/generators/devise_invitable/devise_invitable_generator.rb
devise_invitable-1.7.3 lib/generators/devise_invitable/devise_invitable_generator.rb
devise_invitable-1.7.2 lib/generators/devise_invitable/devise_invitable_generator.rb
devise_invitable-1.7.1 lib/generators/devise_invitable/devise_invitable_generator.rb
devise_invitable-1.7.0 lib/generators/devise_invitable/devise_invitable_generator.rb
devise_invitable-1.6.1 lib/generators/devise_invitable/devise_invitable_generator.rb
devise_invitable-1.6.0 lib/generators/devise_invitable/devise_invitable_generator.rb
devise_invitable-1.5.5 lib/generators/devise_invitable/devise_invitable_generator.rb
devise_invitable-1.5.3 lib/generators/devise_invitable/devise_invitable_generator.rb
devise_invitable-1.5.2 lib/generators/devise_invitable/devise_invitable_generator.rb
devise_invitable-1.5.1 lib/generators/devise_invitable/devise_invitable_generator.rb
devise_invitable-1.5.0 lib/generators/devise_invitable/devise_invitable_generator.rb
devise_invitable-1.4.2 lib/generators/devise_invitable/devise_invitable_generator.rb
devise_invitable-1.4.1 lib/generators/devise_invitable/devise_invitable_generator.rb
devise_invitable-1.4.0 lib/generators/devise_invitable/devise_invitable_generator.rb
devise_invitable-1.3.6 lib/generators/devise_invitable/devise_invitable_generator.rb
devise_invitable-1.3.5 lib/generators/devise_invitable/devise_invitable_generator.rb
devise_invitable-1.3.4 lib/generators/devise_invitable/devise_invitable_generator.rb
devise_invitable-1.3.3 lib/generators/devise_invitable/devise_invitable_generator.rb