Sha256: 8ccb0d15b83cdea23681958e479fa76612310bea77c49f8cbc0271c260bd761c
Contents?: true
Size: 745 Bytes
Versions: 15
Compression:
Stored size: 745 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 class_option :routes, :desc => "Generate routes", :type => :boolean, :default => true def add_devise_routes devise_route = "devise_for :#{plural_name}" devise_route << %Q(, :class_name => "#{class_name}") if class_name.include?("::") devise_route << %Q(, :skip => :all) unless options.routes? route devise_route end end end end
Version data entries
15 entries across 15 versions & 3 rubygems