Add 'RubyFun/' from commit 'b01c6826131196ba58b5288a3182f2526c89c249'
git-subtree-dir: RubyFun git-subtree-mainline:a04a502787
git-subtree-split:b01c682613
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
# Filters added to this controller apply to all controllers in the application.
|
||||
# Likewise, all the methods added will be available for all controllers.
|
||||
|
||||
class ApplicationController < ActionController::Base
|
||||
helper :all # include all helpers, all the time
|
||||
protect_from_forgery # See ActionController::RequestForgeryProtection for details
|
||||
|
||||
# Scrub sensitive parameters from your log
|
||||
# filter_parameter_logging :password
|
||||
end
|
18
RubyFun/rails/hamster/app/controllers/solr_controller.rb
Normal file
18
RubyFun/rails/hamster/app/controllers/solr_controller.rb
Normal file
@@ -0,0 +1,18 @@
|
||||
require 'open-uri'
|
||||
require 'rexml/document'
|
||||
|
||||
|
||||
class SolrController < ApplicationController
|
||||
include SolrHelper
|
||||
|
||||
def simple_query
|
||||
@search = request[:q]
|
||||
@results = []
|
||||
if @search != nil
|
||||
@results = get_results(@search)
|
||||
end
|
||||
end
|
||||
|
||||
def index
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user