2012-05-02 10:18:07 +01:00
|
|
|
class Groups::BaseController < ApplicationController
|
2015-03-04 23:19:19 +00:00
|
|
|
before_action :authenticate_user!
|
|
|
|
before_action :find_group
|
2012-05-02 10:18:07 +01:00
|
|
|
|
|
|
|
protected
|
|
|
|
|
2015-03-19 23:31:41 +00:00
|
|
|
# Private: before_action hook which loads Group.
|
2012-05-02 10:18:07 +01:00
|
|
|
def find_group
|
2012-05-03 22:52:56 +01:00
|
|
|
if group_id = params[:uname] || params[:group_id] || params[:id]
|
2012-05-03 15:08:02 +01:00
|
|
|
@group = Group.find_by_insensitive_uname! group_id
|
2012-05-02 10:18:07 +01:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|