This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class CustomersController < ApplicationController | |
| # … | |
| def create | |
| if auto_create_request? | |
| @customer = Customer.auto_create(customer_params) | |
| else | |
| @customer = Customer.register(customer_params) | |
| end | |
| respond_to do |format| |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| odule Authlogic::Session::Timeout::DontLockoutApiKeyOrHttpAuth | |
| def self.included(klass) | |
| klass.class_eval do | |
| dont_lockout = "single_access? || persist_by_http_auth?" | |
| before_persisting_callback_chain.detect {|c| c.method == :reset_stale_state }.options.update(:unless => dont_lockout) | |
| after_persisting_callback_chain.detect {|c| c.method == :enforce_timeout }.options.update(:unless => dont_lockout) | |
| end | |
| end | |
| end |