Modify query to work better across databases
This commit is contained in:
parent
31a3cb18b7
commit
769cc6c970
1 changed files with 4 additions and 2 deletions
|
|
@ -127,8 +127,10 @@ module Admin
|
||||||
@new_program_length = @conference.new_program_hours(current_user.last_sign_in_at)
|
@new_program_length = @conference.new_program_hours(current_user.last_sign_in_at)
|
||||||
|
|
||||||
@total_withdrawn = @all_events.where(state: :withdrawn).count
|
@total_withdrawn = @all_events.where(state: :withdrawn).count
|
||||||
@new_withdrawn = @all_events
|
@new_withdrawn = @all_events.where(state: :withdrawn).where(
|
||||||
.where('state = "withdrawn" and created_at > ?', current_user.last_sign_in_at).count
|
'events.created_at > ?',
|
||||||
|
current_user.last_sign_in_at
|
||||||
|
).count
|
||||||
|
|
||||||
# Step by step list
|
# Step by step list
|
||||||
@conference_progress = @conference.get_status
|
@conference_progress = @conference.get_status
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue