# Filters added to this controller will be run for all controllers in the application. # Likewise, all the methods added will be available for all controllers. class ApplicationController < ActionController::Base # Hub single sign-on support. Run the Hub filters for all actions to # ensure activity timeouts etc. work properly. Gullery accounts are # only allowed for privileged Hub users. Gullery uses Acts As # Authenticated itself - the distant parent of Hub itself - so all # we do is put a wrapper around the AAA library code. require 'hub_sso_lib' include HubSsoLib::Core before_filter :hubssolib_beforehand after_filter :hubssolib_afterwards # Gullery's standard preamble include AuthenticatedSystem helper_method :textilight, :textilize def textilight(text='') r = RedCloth.new text r.hard_breaks = false r.to_html.gsub(/^

/, '').gsub(/<\/p>$/, '') end def textilize(text='') r = RedCloth.new text r.hard_breaks = false r.to_html.gsub(/^\s+/, '') end end