Class: LamAuth::Generators::LamAuthGenerator

Inherits:
Rails::Generators::NamedBase
  • Object
show all
Defined in:
lib/generators/lam_auth/lam_auth_generator.rb

Instance Method Summary collapse

Instance Method Details

#copy_xd_receiverObject



15
16
17
# File 'lib/generators/lam_auth/lam_auth_generator.rb', line 15

def copy_xd_receiver
  copy_file 'xd_receiver.html', 'public/xd_receiver.html'
end

#copy_ymlObject



19
20
21
# File 'lib/generators/lam_auth/lam_auth_generator.rb', line 19

def copy_yml
  copy_file 'lam_auth.yml', 'config/lam_auth.yml'
end

#inject_controller_contentObject



11
12
13
# File 'lib/generators/lam_auth/lam_auth_generator.rb', line 11

def inject_controller_content
  inject_into_class(File.join("app", "controllers", "application_controller.rb"), 'ApplicationController', "  lam_auth_for :#{file_path}\n")
end