Skip to content

Commit

Permalink
search trying to render twice if no results
Browse files Browse the repository at this point in the history
  • Loading branch information
ianwdunlop committed May 21, 2012
1 parent 7fca98a commit c630c4c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions app/controllers/search_controller.rb
Expand Up @@ -78,16 +78,17 @@ def index
respond_to do |format|
format.html {redirect_to(:back || root_path)}
end
end
#expires_in 20.minutes
end
else
@variable_name = params[:variable_name]
@variable_description = params[:variable_description]
@variable_values = params[:variable_value]
respond_to do |format|
format.html
format.json {render :json=>@results_hash}
end
end
#expires_in 20.minutes
end
end

private
Expand Down

0 comments on commit c630c4c

Please sign in to comment.