¶ ↑
AgegateA simple “active” agegate.
¶ ↑
Installin your Gemfile add:
gem "agegate", :git => 'git://github.com/losco/rails-agegate.git'
and run:
$ bundle install
¶ ↑
Setting upJust run:
$ rails generate agegate:install
In you application_controller.rb file add:
before_filter :check_agegate
and you are good to go.
¶ ↑
ConfigureAdd the following to your configuration, if you need to override one of the default values. This can go in config/application.rb, or customized in each environment in config/environments/.rb:
config.agegate.skip = false config.agegate.min_age = 18