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

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

Instance Method Summary collapse

Instance Method Details

#create_adminObject



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

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

#devise?Boolean

Returns:

  • (Boolean)


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

def devise?
  options[:devise]
end