redmine_crm 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/redmine_crm/rcrm_acts_as_taggable.rb +0 -1
- data/lib/redmine_crm/tag.rb +2 -3
- data/lib/redmine_crm/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3661b03ec0c3d09a9c41e80181930cd950f00cbe
|
4
|
+
data.tar.gz: 953749b65190d3682c9aed7a8ecca66174c9c78e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e2bfe39d6138293c2ac1456003cf885094b7961f6c30e87b4bf1276bcd7a565746a58bbd489c98454f0afc71aa8b8f21fe02573dd063bd7bb3d90d9bcefe0f36
|
7
|
+
data.tar.gz: c85726be43588829945a3f84c300e9d0345bfc9c0d7149fc4c5080db507b587a796c77bfbe5a206366b469509929f0eb7a5e8de5401845c87800f95aee880ef3
|
data/lib/redmine_crm/tag.rb
CHANGED
@@ -4,7 +4,7 @@ module RedmineCrm
|
|
4
4
|
|
5
5
|
validates_presence_of :name
|
6
6
|
# validates_uniqueness_of :name
|
7
|
-
validates :name, :uniqueness =>
|
7
|
+
validates :name, :uniqueness => { :message => " not uniq tag" }
|
8
8
|
validates :name, :presence => true
|
9
9
|
cattr_accessor :destroy_unused
|
10
10
|
self.destroy_unused = false
|
@@ -14,7 +14,7 @@ module RedmineCrm
|
|
14
14
|
# LIKE is used for cross-database case-insensitivity
|
15
15
|
def self.find_or_create_with_like_by_name(name)
|
16
16
|
# find(:first, :conditions => ["name LIKE ?", name]) || create(:name => name)
|
17
|
-
where("name LIKE LOWER(?)", name
|
17
|
+
where("LOWER(name) LIKE LOWER(?)", name).first || create(:name => name)
|
18
18
|
end
|
19
19
|
|
20
20
|
def ==(object)
|
@@ -41,7 +41,6 @@ module RedmineCrm
|
|
41
41
|
def counts(options = {})
|
42
42
|
# find(:all, options_for_counts(options))
|
43
43
|
opt = options_for_counts(options)
|
44
|
-
# byebug
|
45
44
|
select(opt[:select]).where(opt[:conditions]).joins(opt[:joins]).group(opt[:group])
|
46
45
|
end
|
47
46
|
|
data/lib/redmine_crm/version.rb
CHANGED