Permalink
11 comments
on commit
sign in to comment.
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Stringify the incoming hash in FlashHash
Stringify the incoming as well to handle incoming symbol keys from marshalled sessions
- Loading branch information
1 parent
a6ce984
commit a668beffd64106a1e1fedb71cc25eaaa11baf0c1
Showing
1 changed file
with
3 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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
a668bef
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just upgraded my app to the RC and noticed that Symbol keys changed to String keys. Is this expected behavior? It should be documented in the upgrading guide at least. This will break apps for sure.
a668bef
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@senny This won't break any app, as if we try to access notice like
flash[:notice]
, thenwill save you...😄
a668bef
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kuldeepaggarwal it breaks apps that were iterating over the keys and checking for specific keys, for example:
a668bef
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kuldeepaggarwal flash access works but the keys need to be stored in some sort. Before they were symbols and now they are Strings. If you have applications that work with the internal flash representation (like the example of @guilleiguaran) you get different behavior than on Rails 4. I know there are many tutorials and even gems out there that suggest looping through the flash. So this is a compatibility issue.
It's easy to fix though so we need to make sure the user knows what the cause is an how to proceed.
a668bef
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry I missed that...
a668bef
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@senny So should we update the guide?
a668bef
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a668bef
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a668bef
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i updated the upgrading guide. will take care of changelog/ release guide sync next week.
a668bef
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@senny👍
a668bef
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.