Skip to content

Commit

Permalink
Making a local variable not be an instance variable since we won't ne…
Browse files Browse the repository at this point in the history
…ed it in the view
  • Loading branch information
carols10cents committed Oct 29, 2011
1 parent 724806a commit c882595
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/controllers/searches_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ def show
@updates = []
if params[:q]
set_params_page
@leading_char = '\b'
leading_char = '\b'
if params[:q][0] == '#'
@leading_char = ''
leading_char = ''
end
@updates = Update.where(:text => /#{@leading_char}#{Regexp.quote(params[:q])}\b/i).paginate(:page => params[:page], :per_page => params[:per_page], :order => :created_at.desc)
@updates = Update.where(:text => /#{leading_char}#{Regexp.quote(params[:q])}\b/i).paginate(:page => params[:page], :per_page => params[:per_page], :order => :created_at.desc)
set_pagination_buttons(@updates)
end
end
Expand Down

0 comments on commit c882595

Please sign in to comment.