Skip to content

Instantly share code, notes, and snippets.

Jaime Oyarzún Knittel mitoyarzun

Block or report user

Report or block mitoyarzun

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@henrik
henrik / config--initializers--rails4_to_rails3_downgradability.rb
Created Jun 18, 2015
Fix "NoMethodError: undefined method `sweep'" error when downgrading from Rails 4 to Rails 3.
View config--initializers--rails4_to_rails3_downgradability.rb
# Without this fix, downgrading from Rails 4 to Rails 3 causes session cookies to blow up.
#
# The way the flash is stored in the session changed in a backwards-incompatible way.
if Rails::VERSION::MAJOR == 3
module ActionDispatch
class Flash
def call(env)
if (session = env['rack.session']) && (flash = session['flash'])
You can’t perform that action at this time.