{"id":17775473,"url":"https://github.com/pikachuexe/action_controller_tweaks","last_synced_at":"2025-09-19T11:27:02.056Z","repository":{"id":10345325,"uuid":"12480742","full_name":"PikachuEXE/action_controller_tweaks","owner":"PikachuEXE","description":"ActionController is great, but could be better. Here are some tweaks for it.","archived":false,"fork":false,"pushed_at":"2025-05-01T00:38:06.000Z","size":132,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-31T13:37:20.905Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PikachuEXE.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":["PikachuEXE"]}},"created_at":"2013-08-30T07:30:11.000Z","updated_at":"2025-05-01T00:37:11.000Z","dependencies_parsed_at":"2023-02-17T22:45:26.768Z","dependency_job_id":"430f362c-e025-4f56-a476-dfb458c26c74","html_url":"https://github.com/PikachuEXE/action_controller_tweaks","commit_stats":{"total_commits":118,"total_committers":3,"mean_commits":"39.333333333333336","dds":0.05932203389830504,"last_synced_commit":"a833c28737b3a2484a0df7c0baff7e7c272cccbe"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/PikachuEXE/action_controller_tweaks","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PikachuEXE%2Faction_controller_tweaks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PikachuEXE%2Faction_controller_tweaks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PikachuEXE%2Faction_controller_tweaks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PikachuEXE%2Faction_controller_tweaks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PikachuEXE","download_url":"https://codeload.github.com/PikachuEXE/action_controller_tweaks/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PikachuEXE%2Faction_controller_tweaks/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275927056,"owners_count":25554067,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-19T02:00:09.700Z","response_time":108,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-26T21:57:37.132Z","updated_at":"2025-09-19T11:27:01.999Z","avatar_url":"https://github.com/PikachuEXE.png","language":"Ruby","funding_links":["https://github.com/sponsors/PikachuEXE"],"categories":[],"sub_categories":[],"readme":"# Action Controller Tweaks\n\nActionController is great, but could be better. Here are some tweaks for it.\n\n\n## Status\n\n[![GitHub Build Status](https://img.shields.io/github/actions/workflow/status/PikachuEXE/action_controller_tweaks/tests.yaml?branch=master\u0026style=flat-square)](https://github.com/PikachuEXE/action_controller_tweaks/actions/workflows/tests.yaml)\n\n[![Gem Version](http://img.shields.io/gem/v/action_controller_tweaks.svg?style=flat-square)](http://badge.fury.io/rb/action_controller_tweaks)\n[![License](https://img.shields.io/github/license/PikachuEXE/action_controller_tweaks.svg?style=flat-square)](http://badge.fury.io/rb/action_controller_tweaks)\n\n[![Coverage Status](http://img.shields.io/coveralls/PikachuEXE/action_controller_tweaks.svg?style=flat-square)](https://coveralls.io/r/PikachuEXE/action_controller_tweaks)\n[![Code Climate](https://img.shields.io/codeclimate/maintainability/PikachuEXE/action_controller_tweaks.svg?style=flat-square)](https://codeclimate.com/github/PikachuEXE/action_controller_tweaks)\n\n\u003e The above badges are generated by https://shields.io/\n\n\n## Installation\n\n```ruby\ngem 'action_controller_tweaks'\n```\n\n\n## Usage\n\nEither include it in specific controller or just `ApplicationController`\n```ruby\nclass SomeController\n  include ActionControllerTweaks\nend \n```\n\n### `#set_no_cache`\nI got the code from [This Stack Overflow Answer](http://stackoverflow.com/questions/711418/how-to-prevent-browser-page-caching-in-rails)  \n`#expires_now` is not good enough when I test a mobile version page with Chrome on iOS  \nUsage:\n```ruby\n  # Just like using #expires_now\n  set_no_cache\n```\n\n### `#set_session` \u0026 `#set_session_with_expiry`\nI write this on my own, it's ok to blame me if it's buggy :P  \nThis method let's you set session, with expiry time!  \nIt depends on `before_action` to remove expired session keys  \nValid options: `expire_in`, `expires_in`, `expire_at`, `expires_at`\nExample:\n```ruby\n# Option keys are NOT checked\nset_session(:key, 'value') # =\u003e Just like session[:key] = 'value'\n\nset_session(:key, 'value', expire_in: 1.day)\nset_session(:key, 'value', expires_in: 1.day)\n\nset_session(:key, 'value', expire_at: 1.day.from_now)\nset_session(:key, 'value', expires_at: 1.day.from_now)\n\n# Option keys are checked\n# You must pass valid options or error will be raised\nset_session_with_expiry(:key, 'value', expires_in: 1.day)\n```\nNote: Please don't use the session key `session_keys_to_expire`, it's reserved for internal processing\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpikachuexe%2Faction_controller_tweaks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpikachuexe%2Faction_controller_tweaks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpikachuexe%2Faction_controller_tweaks/lists"}