use ActiveSupport::Configurable to store config options class Employee include ActiveSupport::Configurable config_accessor :research_lab_entry, :paid_leave # The config options are now also available as: # employee.research_lab_entry # employee.paid_leave end # Set the config option at the class level Employee.config.paid_leave = 5 # Create a new object and check the value employee = Employee.new employee.config.paid_leave # => 5 # Set a new value at the object-level employee.config.paid_leave = 3 # Now check the value at the class level Employee.config.paid_leave # => 3 Published: June 07 2012 category: tags: Related Posts • iOS ARC trap • Check how many client connected to your internet sharing on your mac • Prevent iCloud backup your downloadable content on iOS • Use bower in rails • jquery page scroll animation • How to solve the error: no decode delegate for this image format • Capistrano with bundler • New xcode uncomfortable things • Problem with carrierwave when you have two servers • ruby slice_before method Tweet Please enable JavaScript to view the comments powered by Disqus. blog comments powered by Disqus