No release in over a year
ActionController is great, but could be better. Here are some tweaks for it.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 4.0.0
~> 2.0
>= 1.0.0
>= 10.0, <= 14.0
~> 1.0
>= 1.3
>= 3.0.0
>= 0.6
>= 0.21

Runtime

>= 5.2.0, < 8.0.0
>= 5.2.0, < 8.0.0
 Project Readme

Action Controller Tweaks

ActionController is great, but could be better. Here are some tweaks for it.

Status

GitHub Build Status

Gem Version License

Coverage Status Code Climate

The above badges are generated by https://shields.io/

Installation

gem 'action_controller_tweaks'

Usage

Either include it in specific controller or just ApplicationController

class SomeController
  include ActionControllerTweaks
end 

#set_no_cache

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
Usage:

  # Just like using #expires_now
  set_no_cache

#set_session & #set_session_with_expiry

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!
It depends on before_action to remove expired session keys
Valid options: expire_in, expires_in, expire_at, expires_at Example:

# Option keys are NOT checked
set_session(:key, 'value') # => Just like session[:key] = 'value'

set_session(:key, 'value', expire_in: 1.day)
set_session(:key, 'value', expires_in: 1.day)

set_session(:key, 'value', expire_at: 1.day.from_now)
set_session(:key, 'value', expires_at: 1.day.from_now)

# Option keys are checked
# You must pass valid options or error will be raised
set_session_with_expiry(:key, 'value', expires_in: 1.day)

Note: Please don't use the session key session_keys_to_expire, it's reserved for internal processing