Skip to content

Instantly share code, notes, and snippets.

View after_removing_callbacks_controller.rb
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|
View authlogic_dont_lockout_api_key_or_http_auth.rb
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