Class: IshManager::CategoriesController
Instance Method Summary
collapse
#basic_auth, #home, #tinymce
Instance Method Details
#index ⇒ Object
6
7
8
9
10
11
|
# File 'app/controllers/ish_manager/categories_controller.rb', line 6
def index
authorize! :categories_index, IshManager::Ability
@categories_flat = Category.all_flat
@tags = Category.all_tags
end
|
#show ⇒ Object
13
14
15
16
17
18
19
20
21
22
23
|
# File 'app/controllers/ish_manager/categories_controller.rb', line 13
def show
@category = WpTag.find params[:id]
authorize! :show, @category
@leads = @category.leads
if params[:q].present?
@leads = @leads.where(" email LIKE ? ", "%#{params[:q]}%" )
end
@leads = @leads.page( params[:leads_page] ).per( current_profile.per_page )
end
|