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
# This patch handles both types of flashes that are created in | |
# Rails 3.2.22 as well as those created in Rails 3.0.20 | |
ActiveRecord::SessionStore::Session.class_eval do | |
def self.unmarshal(data) | |
return unless data | |
marshalled = nil | |
begin |
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 Temp | |
@@count = 0 | |
def initialize | |
@@count += 1 | |
end | |
def self.count | |
@@count | |
end | |
end |
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
# Supports both kind of flash messages (Rails 3.0.20 and 3.2.22) | |
# It converts Hash type of flash messages to Object type of flashes | |
ActiveRecord::SessionStore::Session.class_eval do | |
def self.convert_to_3_2(flash_data) | |
return unless flash_data | |
flash_new = ActionDispatch::Flash::FlashHash.new |
NewerOlder