Module: Helpers::Routing::InstanceMethods
- Defined in:
- lib/helpers/routing.rb
Instance Method Summary collapse
-
#authentasaurus_authorizable(*opts) ⇒ Object
TODO: add documentation here.
-
#authentasaurus_invitable(*opts) ⇒ Object
TODO: add documentation here.
- #authentasaurus_invitable_public(*opts) ⇒ Object
-
#authentasaurus_recoverable(*opts) ⇒ Object
TODO: add documentation here.
-
#authentasaurus_routes(*opts) ⇒ Object
TODO: add documentation here.
-
#authentasaurus_sessions(*opts) ⇒ Object
TODO: add documentation here.
-
#authentasaurus_users(*opts) ⇒ Object
TODO: add documentation here.
-
#authentasaurus_validatable(*opts) ⇒ Object
TODO: add documentation here.
Instance Method Details
#authentasaurus_authorizable(*opts) ⇒ Object
TODO: add documentation here
50 51 52 53 54 55 56 |
# File 'lib/helpers/routing.rb', line 50 def (*opts) = opts. resources :groups, .dup resources :areas, .dup resources :permissions, .dup end |
#authentasaurus_invitable(*opts) ⇒ Object
TODO: add documentation here
68 69 70 71 72 |
# File 'lib/helpers/routing.rb', line 68 def authentasaurus_invitable(*opts) = opts. resources :user_invitations, .dup.merge({:except => [:show, :edit, :update]}) end |
#authentasaurus_invitable_public(*opts) ⇒ Object
74 75 76 77 78 |
# File 'lib/helpers/routing.rb', line 74 def authentasaurus_invitable_public(*opts) = opts. resources :registrations, :only => [:new, :create], :path_prefix => "/:token", :requirements => {:token => /[0-9a-zA-Z]+/} end |
#authentasaurus_recoverable(*opts) ⇒ Object
TODO: add documentation here
81 82 83 84 85 86 87 88 |
# File 'lib/helpers/routing.rb', line 81 def authentasaurus_recoverable(*opts) = opts. forgot_password "/forgot-password", .dup.merge({ :controller => :recoveries, :action => :new, :conditions => { :method => :get } }) do_forgot_password "/forgot-password", .dup.merge({ :controller => :recoveries, :action => :create, :conditions => { :method => :post } }) recover_password "/recover-password/:token", .dup.merge({ :controller => :recoveries, :action => :edit, :conditions => { :method => :get } }) do_recover_password "/recover-password/:token", .dup.merge({ :controller => :recoveries, :action => :destroy, :conditions => { :method => :delete } }) end |
#authentasaurus_routes(*opts) ⇒ Object
TODO: add documentation here
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/helpers/routing.rb', line 9 def authentasaurus_routes(*opts) = opts. # Authenticatable authentasaurus_sessions .dup authentasaurus_users .dup # Recoverable authentasaurus_recoverable .dup # Authorizable if opts.include?(:authorizable) .dup end # Validatable if opts.include?(:validatable) authentasaurus_validatable .dup end # Invitable if opts.include?(:invitable) authentasaurus_invitable .dup authentasaurus_invitable_public end end |
#authentasaurus_sessions(*opts) ⇒ Object
TODO: add documentation here
36 37 38 39 40 |
# File 'lib/helpers/routing.rb', line 36 def authentasaurus_sessions(*opts) = opts. resources :sessions, .dup.merge({:except => [:index, :show, :edit, :update], :path_names => {:new => 'sign-in'}, :collection => {:no_access => :get}}) end |
#authentasaurus_users(*opts) ⇒ Object
TODO: add documentation here
43 44 45 46 47 |
# File 'lib/helpers/routing.rb', line 43 def authentasaurus_users(*opts) = opts. resources :users, .dup end |
#authentasaurus_validatable(*opts) ⇒ Object
TODO: add documentation here
59 60 61 62 63 64 65 |
# File 'lib/helpers/routing.rb', line 59 def authentasaurus_validatable(*opts) = opts. validate "/validate", .dup.merge({:controller => :validations, :action => :activate}) resend_validation_email "/resend-validation", .dup.merge({:controller => :validations, :action => :resend_validation_email, :conditions => {:method => :get}}) do_resend_validation_email "/resend-validation", .dup.merge({:controller => :validations, :action => :do_resend_validation_email, :conditions => {:method => :post}}) end |