redmine_crm 0.0.27 → 0.0.28

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6525848b0cfe3df65dcbf1ea5903e2ec780ba6e2
4
- data.tar.gz: 9ef776d6118e3998256da878882d7635c798306d
3
+ metadata.gz: 06e250724e907f5c6c3b2590d5bd59994d21bba4
4
+ data.tar.gz: 43d893aed3e87d16da19667b5a3705cc190d07aa
5
5
  SHA512:
6
- metadata.gz: dda3c0995a07c820d329891e3346a713ce561a2810b95cec21faee00457aaba9a068fa4f53df6008ed07ba03d39c929c972bf63f615dd57dacb4cb6eaee74c1f
7
- data.tar.gz: 122d384d961f9724a3c696caa9178e977138180e4179d802e44bbd9ca685e9c113277deadf400c882421c5e99fd9d2a7a77e6c12c36a0ff60e4ce217e33feb6f
6
+ metadata.gz: 210d2487c18e8a6d9a540f889fc30b8631922cc9aef5c98856f4cd2ae5e2e6669ec43bc87359d27fd5d5f9463e185c00219308f2ea3a64f358b2faef477e83aa
7
+ data.tar.gz: 429c087175aba643771e724e8137b57875552b6026c2bcb5bce3f55f7dbab42c4275c26e1f802cc9a3203124b678732d857e94011b17655a5c70d1a7c0a12be3
@@ -4,6 +4,10 @@ Redmine crm gem - general functions for plugins (tags, vote, viewing, currency)
4
4
  Copyright (C) 2011-2017 RedmineUP
5
5
  https://www.redmineup.com/
6
6
 
7
+ == 2017-03-17 v0.0.28
8
+
9
+ * Fixed bug with quote_value
10
+
7
11
  == 2017-03-13 v0.0.27
8
12
 
9
13
  * Added IP to Votes
@@ -90,7 +90,7 @@ module RedmineCrm
90
90
  # Example: Question.available_tags(@project_id )
91
91
  def available_tags(project = nil, limit = 30)
92
92
  scope = Tag.where({})
93
- class_name = quote_value(base_class.name)
93
+ class_name = quote_string_value(base_class.name)
94
94
  join = []
95
95
  join << "JOIN #{Tagging.table_name} ON #{Tagging.table_name}.tag_id = #{Tag.table_name}.id "
96
96
  join << "JOIN #{table_name} ON #{table_name}.id = #{Tagging.table_name}.taggable_id
@@ -136,7 +136,7 @@ module RedmineCrm
136
136
  AND #{Tagging.table_name}.taggable_id IN (#{related_ids})
137
137
  AND #{Tagging.table_name}.tag_id = #{Tag.table_name}.id").order(
138
138
  options[:order] || "count DESC, #{Tag.table_name}.name").group(
139
- "#{Tag.table_name}.id, #{Tag.table_name}.name HAVING #{Tag.table_name}.name NOT IN (#{tags.map { |n| quote_value(n) }.join(",")})")
139
+ "#{Tag.table_name}.id, #{Tag.table_name}.name HAVING #{Tag.table_name}.name NOT IN (#{tags.map { |n| quote_string_value(n) }.join(",")})")
140
140
  end
141
141
 
142
142
  # Pass either a tag, string, or an array of strings or tags.
@@ -164,7 +164,7 @@ module RedmineCrm
164
164
  taggings_alias, tags_alias = "#{table_name}_taggings", "#{table_name}_tags"
165
165
 
166
166
  joins = [
167
- "INNER JOIN #{Tagging.table_name} #{taggings_alias} ON #{taggings_alias}.taggable_id = #{table_name}.#{primary_key} AND #{taggings_alias}.taggable_type = #{quote_value(base_class.name)}",
167
+ "INNER JOIN #{Tagging.table_name} #{taggings_alias} ON #{taggings_alias}.taggable_id = #{table_name}.#{primary_key} AND #{taggings_alias}.taggable_type = #{quote_string_value(base_class.name)}",
168
168
  "INNER JOIN #{Tag.table_name} #{tags_alias} ON #{tags_alias}.id = #{taggings_alias}.tag_id"
169
169
  ]
170
170
 
@@ -173,7 +173,7 @@ module RedmineCrm
173
173
  #{table_name}.id NOT IN
174
174
  (SELECT #{Tagging.table_name}.taggable_id FROM #{Tagging.table_name}
175
175
  INNER JOIN #{Tag.table_name} ON #{Tagging.table_name}.tag_id = #{Tag.table_name}.id
176
- WHERE #{tags_condition(tags)} AND #{Tagging.table_name}.taggable_type = #{quote_value(base_class.name)})
176
+ WHERE #{tags_condition(tags)} AND #{Tagging.table_name}.taggable_type = #{quote_string_value(base_class.name)})
177
177
  END
178
178
  else
179
179
  if options.delete(:match_all)
@@ -198,7 +198,7 @@ module RedmineCrm
198
198
  join = <<-END
199
199
  INNER JOIN #{Tagging.table_name} #{taggings_alias} ON
200
200
  #{taggings_alias}.taggable_id = #{table_name}.#{primary_key} AND
201
- #{taggings_alias}.taggable_type = #{quote_value(base_class.name)}
201
+ #{taggings_alias}.taggable_type = #{quote_string_value(base_class.name)}
202
202
 
203
203
  INNER JOIN #{Tag.table_name} #{tags_alias} ON
204
204
  #{taggings_alias}.tag_id = #{tags_alias}.id AND
@@ -229,7 +229,7 @@ module RedmineCrm
229
229
  conditions = []
230
230
  conditions << send(:sanitize_conditions, options.delete(:conditions)) if options[:conditions]
231
231
  conditions << send(:sanitize_conditions, scope) if scope
232
- conditions << "#{Tagging.table_name}.taggable_type = #{quote_value(base_class.name)}"
232
+ conditions << "#{Tagging.table_name}.taggable_type = #{quote_string_value(base_class.name)}"
233
233
  conditions << type_condition unless descends_from_active_record?
234
234
  conditions.compact!
235
235
  conditions = conditions.join(" AND ")
@@ -249,7 +249,7 @@ module RedmineCrm
249
249
  end
250
250
 
251
251
  private
252
- def quote_value(object)
252
+ def quote_string_value(object)
253
253
  sanitize(object)
254
254
  end
255
255
 
@@ -1,3 +1,3 @@
1
1
  module RedmineCrm
2
- VERSION = "0.0.27"
2
+ VERSION = "0.0.28"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: redmine_crm
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.27
4
+ version: 0.0.28
5
5
  platform: ruby
6
6
  authors:
7
7
  - RedmineUP
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-03-13 00:00:00.000000000 Z
11
+ date: 2017-03-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: liquid