Class: Formol::CategoriesController

Inherits:
ApplicationController show all
Defined in:
app/controllers/formol/categories_controller.rb

Instance Method Summary collapse

Methods inherited from ApplicationController

#last_page_forum_topic_path, #paginated_forum_topic_post_path, #per_page, #topic_last_page_number, #topic_post_page_number

Instance Method Details

#indexObject



5
6
7
8
9
10
11
# File 'app/controllers/formol/categories_controller.rb', line 5

def index
  formol_authorize!(current_formol_user, :read_category)
  
  @categories = Formol::Category.ready_for_listing
  
  respond_with(@categories)
end

#showObject



13
14
15
16
17
18
19
# File 'app/controllers/formol/categories_controller.rb', line 13

def show
  formol_authorize!(current_formol_user, :read_category)
  
  @category = Formol::Category.find(params[:id])
  
  respond_with(@category)
end