Sha256: 0ac70c82f22cca3c4aec15bc4b8ebc5532d0d2a16c86e22e2c554d22fbcdc2df

Contents?: true

Size: 585 Bytes

Versions: 14

Compression:

Stored size: 585 Bytes

Contents

module Devise
  module Generators
    class DeviseGenerator < Rails::Generators::NamedBase
      namespace "devise"
      source_root File.expand_path("../templates", __FILE__)

      desc "Generates a model with the given NAME (if one does not exist) with devise " <<
           "configuration plus a migration file and devise routes."

      hook_for :orm

      def add_devise_routes
        devise_route  = "devise_for :#{plural_name}"
        devise_route += %Q(, :class_name => "#{class_name}") if class_name.include?("::")
        route devise_route
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 3 rubygems

Version Path
devise_sociable-0.1.0 vendor/bundle/gems/devise-1.2.1/lib/generators/devise/devise_generator.rb
devise-1.4.5 lib/generators/devise/devise_generator.rb
devise-1.4.3 lib/generators/devise/devise_generator.rb
devise-1.4.2 lib/generators/devise/devise_generator.rb
devise-1.4.1 lib/generators/devise/devise_generator.rb
devise-1.3.4 lib/generators/devise/devise_generator.rb
devise-1.3.3 lib/generators/devise/devise_generator.rb
devise-1.3.2 lib/generators/devise/devise_generator.rb
devise-1.3.1 lib/generators/devise/devise_generator.rb
devise-1.3.0 lib/generators/devise/devise_generator.rb
devise-1.2.1 lib/generators/devise/devise_generator.rb
devise-1.2.0 lib/generators/devise/devise_generator.rb
devise-jdguyot-1.2.rc3 lib/generators/devise/devise_generator.rb
devise-1.2.rc2 lib/generators/devise/devise_generator.rb