mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-19 16:50:12 +01:00
improve last path. Thanks Vitaliel!
This commit is contained in:
parent
8cdae83014
commit
01a011ee06
2 changed files with 2 additions and 5 deletions
|
|
@ -652,7 +652,7 @@ class StatsController < ApplicationController
|
||||||
"AND tags.id = taggings.tag_id " +
|
"AND tags.id = taggings.tag_id " +
|
||||||
"AND taggings.taggable_id = todos.id ", current_user.id])
|
"AND taggings.taggable_id = todos.id ", current_user.id])
|
||||||
tags_ids_s = tag_ids.map(&:id).sort.join(",")
|
tags_ids_s = tag_ids.map(&:id).sort.join(",")
|
||||||
return {} if tags_ids_s.blank? # return empty array for .size to work
|
return {} if tags_ids_s.blank? # return empty hash for .size to work
|
||||||
return Tag.find(:all, :conditions => "id in (" + tags_ids_s + ")")
|
return Tag.find(:all, :conditions => "id in (" + tags_ids_s + ")")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -99,10 +99,7 @@ class StatsControllerTest < Test::Unit::TestCase
|
||||||
assert_response :success
|
assert_response :success
|
||||||
|
|
||||||
# clear taggings table and render again
|
# clear taggings table and render again
|
||||||
taggings = Tagging.find(:all)
|
Tagging.delete_all
|
||||||
taggings.each do |t|
|
|
||||||
t.delete
|
|
||||||
end
|
|
||||||
get :index
|
get :index
|
||||||
assert_response :success
|
assert_response :success
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue