Flowdock

Good notes posted by ronald

RSS feed
March 27, 2009
3 thanks

multiple filter example

actually you can have it even shorter with:

before_filter :authorize, :set_locale, :except => :login
January 26, 2009
5 thanks

two ways to disable single table inheritance

  1. Don’t use the column name ‘type’

  2. Or if the first is no option for you: Tell Rails to look for a not existing column like:

class MyModel < ActiveRecord::Base

  # disable STI
  inheritance_column = :_type_disabled
end  
January 26, 2009 - (>= v2.2.1)
3 thanks

alternative (working with 2.2.X)

ActionController::Base.relative_url_root