Changesets can be listed by changeset number.
The Git repository is here.
Changeset 307
Fix Forum typing error that would cause empty search strings
to generate an error; fix bug on the same line which forced
a lower case database search, but forgot to coerce the search
string to lower case too.
- Comitted by: rool
- Date: Friday March 18 14:14:03 2011 (over 13 years ago)
Affected files:
rool/rails/beast/trunk/app/controllers/posts_controller.rb:
prev. | current | |
end | ||
def search | ||
30 | | |
30 | conditions = params[:q].blank? ? nil : Post.send(:sanitize_sql, ['LOWER(posts.body) LIKE ?', "%#{params[:q].downcase}%"]) | |
@post_pages, @posts = paginate(:posts, @@query_options.merge(:conditions => conditions)) | ||
@users = User.find(:all, :select => 'distinct *', :conditions => ['id in (?)', @posts.collect(&:user_id).uniq]).index_by(&:id) | ||
render_posts_or_xml :index |