Sha256: e3ca292948a486656e0dd3ae3ab47f19e72f081d502b3619f4b178d227c82a38
Contents?: true
Size: 690 Bytes
Versions: 1
Compression:
Stored size: 690 Bytes
Contents
class GroupsController < InheritedResources::Base load_and_authorize_resource respond_to :html, :xml, :js def index @groups = Group.alphabetic. letter(params[:letter]). search(params[:search]). tagged_with(params[:tag]). paginate(:per_page => 10, :page => params[:page]) index! do |format| format.html { render :layout => (user_signed_in? ? 'application' : 'frontpage') } end end protected # Overwrite resource method to support slug # See InheritedResources::BaseHelpers#resource def resource @group ||= end_of_association_chain.find_by_slug!(params[:id]) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
social_stream-0.4.4 | app/controllers/groups_controller.rb |