mirror of
https://github.com/Retrospring/retrospring.git
synced 2024-11-20 18:39:52 +01:00
remove strict case requirement
This commit is contained in:
parent
19d6ccd855
commit
36d6cd5816
2 changed files with 3 additions and 3 deletions
|
@ -72,9 +72,9 @@ class Ajax::InboxController < ApplicationController
|
|||
|
||||
def remove_all_author
|
||||
begin
|
||||
@target_user = User.find_by_screen_name params[:author]
|
||||
@target_user = User.where('LOWER(screen_name) = ?', params[:author].downcase).first!
|
||||
@inbox = current_user.inboxes.joins(:question)
|
||||
.where(questions: { user_id: @target_user.id, author_is_anonymous: false })
|
||||
.where(questions: { user_id: @target_user.id, author_is_anonymous: false })
|
||||
@inbox.each { |i| i.remove }
|
||||
rescue
|
||||
@status = :err
|
||||
|
|
|
@ -9,7 +9,7 @@ class InboxController < ApplicationController
|
|||
if params[:author].present?
|
||||
begin
|
||||
@author = true
|
||||
@target_user = User.find_by_screen_name params[:author]
|
||||
@target_user = User.where('LOWER(screen_name) = ?', params[:author].downcase).first!
|
||||
@inbox_author = current_user.inboxes.joins(:question)
|
||||
.where(questions: { user_id: @target_user.id, author_is_anonymous: false })
|
||||
.paginate(page: params[:page])
|
||||
|
|
Loading…
Reference in a new issue