>To Add custom conditions to authlogic finders first of all we need to override authlogic find_by_login method.class UserSession < Authlogic::Session::Base after_validation :check_if_verified find_by_login_method :find_by_login_and_deleted_methodendThen we need to define overridden method inside User modelclass User < ActiveRecord::Base acts_as_authentic def self.find_by_login_and_deleted_method(login) find_by_email_and_deleted(login, false) endendgot easy..wooooooo 🙂
Month: November 2010
Paperclip: validates_attachment_content_type always fails in IE 6 and 7 for jepg and png image
If you are using paperclip plugin for uploading images in your rails application and you are validating image format. Image format validation working in Firefox, safari but not in IE, even you are uploading image in correct format in IE then they showing error, image format not correct. eg: validates_attachment_content_type :image, :message => 'Please upload … Continue reading Paperclip: validates_attachment_content_type always fails in IE 6 and 7 for jepg and png image
Getting started with heroku
>Heroku basics
