Sha256: 512450921e471067c1fcabb7ba286535227060aee841f0fd1ee28cff2a07c5f8

Contents?: true

Size: 401 Bytes

Versions: 2

Compression:

Stored size: 401 Bytes

Contents

class SearchController < 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

2 entries across 2 versions & 1 rubygems

Version Path
forgeos_core-1.9.5.rc2 app/controllers/search_controller.rb
forgeos_core-1.9.5.rc1 app/controllers/search_controller.rb