Sha256: d7f5bff19838ad00fe6b3d519bf035e40b8e075f062a1461918717f4d200ad59
Contents?: true
Size: 598 Bytes
Versions: 1
Compression:
Stored size: 598 Bytes
Contents
class DeviseLdapMultipleGenerator < Rails::Generators::Base source_root File.expand_path("../templates", __FILE__) argument :user_model, :type => :string, :default => "user", :desc => "Model to update" # ToDo: Request user input to use a scope that already exists, or make it a parameter to pass into the generator def create_ldap_config copy_file "default.yml", "config/ldap/#{user_model}.yml" end def update_user_model gsub_file "app/models/#{user_model}.rb", /:database_authenticatable/, ":ldap_authenticatable" if options.update_model? end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
devise_ldap_multiple-0.9.1 | lib/generators/devise_ldap_multiple/devise_ldap_multiple_generator.rb |