Skip to content

Commit

Permalink
allow user to specify devise model name when executing install_admin …
Browse files Browse the repository at this point in the history
…generator
  • Loading branch information
Lee Jarvis authored and sferik committed Dec 16, 2010
1 parent 155bf99 commit ff9c3db
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/generators/rails_admin/install_admin_generator.rb
@@ -1,6 +1,7 @@
module RailsAdmin
class InstallAdminGenerator < Rails::Generators::Base
source_root File.expand_path('../templates', __FILE__)
argument :model_name, :type => :string, :default => 'user'

desc "RailsAdmin Install"

Expand Down Expand Up @@ -61,7 +62,7 @@ def parse_route_files
def set_devise
puts "Setting up devise for you!
======================================================"
invoke 'devise', ['user']
invoke 'devise', [model_name]
end

def copy_locales_files
Expand Down

0 comments on commit ff9c3db

Please sign in to comment.