UCB Rails (Rails 4 Compatible, see master branch for Rails 3)
Get a jump start on your Rails project at UCB. Includes:
- CalNet authentication with omniauth-cas
- LDAP integration with ucb_ldap
- includes several other gems including:
Add it to your Gemfile
gem 'ucb_rails'# 'bootstrap-view-helpers' needs to be added as well gem 'bootstrap-view-helpers', github: 'ucb-ist-eas/bootstrap-view-helpers', branch: 'rails4'
From the command line, install the
bundle install rails g ucb_rails:install
Run installers for included gems:
rails generate user_announcements:install rails generate simple_form:install --bootstrap
Remove superseded files:
Add includes to application stylesheet
*= require bootstrap-datepicker3
//= require bootstrap-datepicker
Restart your server and point your browser to:
You'll be able to CalNet authenticate. Successful authentiation will redirect
root_path but the definition in your
host app (if any) will take precedence.
View Helper Methods
Upgrading From An Older Version
If you're upgrading from a version older than March 2015, you'll need to run an extra migration in the project that contains the ucb_rails gem. This will add an
alternate_email column to your users table.
cp ucb_rails/dummy/db/migrate//20150318234744_add_alternate_email_to_users.rb [YOUR_PROJECT_ROOT]/db/migrate