Sha256: 866371b0cbbd319cb78ae8d86c67c22244b883c969f151a3d314a0b987136b8c

Contents?: true

Size: 410 Bytes

Versions: 4

Compression:

Stored size: 410 Bytes

Contents

class SearchController < Forgeos::ApplicationController
  before_filter :init_index, :only => :index
  def index
    search_keyword = SearchKeyword.find_by_keyword(@keywords) || SearchKeyword.create(:keyword => @keywords)
    search_keyword.search_keyword_counters.new.increment_counter
  end

private
  def init_index
    @items = []
    @keywords = params[:keywords]
    render if @keywords.blank?
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
forgeos_core-1.9.4 app/controllers/search_controller.rb
forgeos_core-1.9.3 app/controllers/search_controller.rb
forgeos_core-1.9.2 app/controllers/search_controller.rb
forgeos_core-1.9.1 app/controllers/search_controller.rb