Class: EasyCaptcha::Generators::InstallGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- EasyCaptcha::Generators::InstallGenerator
- Defined in:
- lib/generators/easy_captcha/install_generator.rb
Overview
:nodoc:
Instance Method Summary collapse
-
#add_after_filter ⇒ Object
:nodoc:.
-
#add_devise_routes ⇒ Object
:nodoc:.
-
#copy_initializer ⇒ Object
:nodoc:.
Instance Method Details
#add_after_filter ⇒ Object
:nodoc:
18 19 20 21 22 |
# File 'lib/generators/easy_captcha/install_generator.rb', line 18 def add_after_filter #:nodoc: inject_into_class 'app/controllers/application_controller.rb', ApplicationController do " # reset captcha code after each request for security\n after_filter :reset_last_captcha_code!\n\n" end end |
#add_devise_routes ⇒ Object
:nodoc:
14 15 16 |
# File 'lib/generators/easy_captcha/install_generator.rb', line 14 def add_devise_routes #:nodoc: route 'captcha_route' end |
#copy_initializer ⇒ Object
:nodoc:
10 11 12 |
# File 'lib/generators/easy_captcha/install_generator.rb', line 10 def copy_initializer #:nodoc: template 'easy_captcha.rb', 'config/initializers/easy_captcha.rb' end |