rosa-build/app/controllers/groups/base_controller.rb

14 lines
343 B
Ruby
Raw Normal View History

class Groups::BaseController < ApplicationController
2015-03-04 23:19:19 +00:00
before_action :authenticate_user!
before_action :find_group
protected
2015-03-19 23:31:41 +00:00
# Private: before_action hook which loads Group.
def find_group
if group_id = params[:uname] || params[:group_id] || params[:id]
@group = Group.find_by_insensitive_uname! group_id
end
end
end