Action Controller Tweaks
ActionController is great, but could be better. Here are some tweaks for it.
- Action Controller of version
3.1and below got problem with buggy
2.0.0(except Rails 4 with
Either include it in specific controller or just
class SomeController include ActionControllerTweaks end
I got the code from This Stack Overflow Answer
#expires_now is not good enough when I test a mobile version page with Chrome on iOS
# Just like using #expires_now set_no_cache
I write this on my own, it's ok to blame me if it's buggy :P
This method let's you set session, with expiry time!
set_session(:key, 'value', expire_in: 1.day)
Note: Please don't use the session key
session_keys_to_expire, it's reserved for internal processing