spec/lib/applier_spec.rb in parelation-0.0.1 vs spec/lib/applier_spec.rb in parelation-0.1.0
- old
+ new
@@ -20,11 +20,12 @@
"order" => ["created_at:desc", "name:asc"],
"limit" => "50",
"offset" => "100"
}
- criteria = klass.new(Project.create.tickets, params).apply
- ar_query = Project.create.tickets
+ project = Project.create
+ criteria = klass.new(project.tickets, params).apply
+ ar_query = project.tickets
.select(:id, :name, :state, :message)
.where(state: ["open", "pending"])
.where.not(state: "closed")
.where(%Q{"tickets".'created_at' > ?}, "2014-01-01 00:00:00.000000")
.where(%Q{"tickets".'updated_at' >= ?}, "2014-01-01 00:00:00.000000")