Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require_dependency "search_helper"
- class Admin::SearchController < Admin::AskenController
- include SearchHelper
- search_mode :public => false
- model([:document, :tag, :archive_file, :image_file, :profile_image, :meta_file] + AskenEngine.content_model_names)
- def self.extra_search_models
- [ Group, Comment, User ] # BaseContent is used by default
- end
- def index
- end
- # method to be compatible with the old SimplSearch-api this should be redone
- def search
- view_results( self.extra_search_models )
- render :action => 'results'
- end
- def results
- view_results( self.extra_search_models)
- end
- #-----------------------------------------------------------------------
- # search through the index, get the ActiveRecord's that match and
- # return those to the caller
- #-----------------------------------------------------------------------
- def live
- @base_content = BaseContent.find_by_id(params[:base_content_id])
- @base_content ||=BaseContent.new
- # call ferret
- view_results()
- render :partial => 'editing_results', :locals => { :results => @results, :base_content => @base_content, :show_tools => true }
Add Comment
Please, Sign In to add comment