class ApplicationController < ActionController::Base # Hub single sign-on support. require 'hub_sso_lib' include HubSsoLib::Core before_filter :hubssolib_beforehand after_filter :hubssolib_afterwards protected def find_book @book = Book.find_by_url_name(params[:book_url_name]) end def default_url_options(options) options.reverse_merge!({ :book_url_name => @book ? @book.url_name : nil }) end end