1
0
Fork 0
forked from OpenNeo/impress
impress/app/controllers/items_controller.rb

13 lines
254 B
Ruby
Raw Normal View History

2010-05-15 10:47:46 -07:00
class ItemsController < ApplicationController
def index
if params.has_key?(:q)
@query = params[:q]
begin
2010-05-15 11:01:15 -07:00
@results = Item.search(@query).alphabetize.all
2010-05-15 10:47:46 -07:00
rescue
flash[:alert] = $!.message
end
end
end
end