Class: Trestle::Auth::Generators::AdminGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/generators/trestle/auth/admin/admin_generator.rb

Instance Method Summary collapse

Instance Method Details

#create_adminObject



13
14
15
# File 'lib/generators/trestle/auth/admin/admin_generator.rb', line 13

def create_admin
  template "admin.rb.erb", File.join('app/admin/auth', "#{model.underscore.pluralize}_admin.rb")
end

#devise?Boolean

Returns:

  • (Boolean)


17
18
19
# File 'lib/generators/trestle/auth/admin/admin_generator.rb', line 17

def devise?
  options[:devise]
end