Class: Admin::SearchController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- Admin::SearchController
- Defined in:
- app/controllers/admin/search_controller.rb
Instance Method Summary collapse
Instance Method Details
#index ⇒ Object
2 3 4 5 6 7 8 9 10 11 12 |
# File 'app/controllers/admin/search_controller.rb', line 2 def index if params[:q] @pages = Page.search(params[:q]).uniq if current_user.designer? || current_user.admin? @layouts = Layout.search(params[:q]).uniq @snippets = Snippet.search(params[:q]).uniq if defined?(SnippetsExtension) @templates = Template.search(params[:q]).uniq if defined?(TemplatesExtension) @banners = Banner.search(params[:q]).uniq if defined?(BannerRotatorExtension) end end end |