RubyFlow The Ruby and Rails community linklog

×

The Ruby and Rails community linklog

Made a library? Written a blog post? Found a useful tutorial? Share it with the Ruby community here or just enjoy what everyone else has found!

Rails Gem cookie_tracker for easily storing and updating user preference settings.

The cookie_tracker gem simplifies the task of keeping track of certain user preference settings, typically display related. It provides a nice instance method you can use in your controller to define these settings as a hash along with default options. Each setting is made available to your controllers and views as instance variables and stored in the users cookies. Any time a user changes the value and submits the form, the instance variables and cookies are updated to reflect that change. Settings can be stored in the session store if that’s what you prefer. You can override default values using an initializer file. Check out the Github page: CookieTracker Give it a shot and let me know what you think.

Post a comment

You can use basic HTML markup (e.g. <a>) or Markdown.

As you are not logged in, you will be
directed via GitHub to signup or sign in