Skip to content

Commit

Permalink
get removed items
Browse files Browse the repository at this point in the history
  • Loading branch information
emiko committed Apr 10, 2014
1 parent acc8f89 commit 6f03e6c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions app/models/ndl_statistic.rb
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,11 @@ def calc_manifestation_counts
query += " AND circulation_status_id = #{@circulation_removed_id}"
query += " AND removed_at between ? and ?" if type == "removed"
end
items_all = type == "removed" ? Item.joins(:manifestation).where(query, @curr_term_end, @prev_term_end, @curr_term_end):
Item.joins(:manifestation).where(query, @curr_term_end)
if type == "removed"
items_all = Item.joins(:manifestation).where(query, @curr_term_end, @prev_term_end, @curr_term_end)
else
items_all = Item.joins(:manifestation).where(query, @curr_term_end)
end

# 日本、外国
REGION_LIST.each do |region|
Expand Down

0 comments on commit 6f03e6c

Please sign in to comment.