autoforme 0.5.2 → 0.5.3

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: 38de0a66935c0a09e6b2e4302fad7860f051aa35
4
- data.tar.gz: 1fd338240c95d55401ea5e44f0c949f575fdad7b
3
+ metadata.gz: ec337a25a71c6c86396c93e659b5b0729d55a8a3
4
+ data.tar.gz: 3c0e80ddbfc27c16befd3d99c984eb417f0734ad
5
5
  SHA512:
6
- metadata.gz: 97edee23d620a6e9854f6a7c105909687b80d31a71e6bcfcf2bb98cae1244a592b622ebe7a5c791169c41f5e37bf06e28b07c371c41a2e27a82a31927b6737b5
7
- data.tar.gz: 08356511c1ae30e5c8db04b8ab8e95ecb57a475b2fa0a56fd5f9ccba549ccfd3b7791007e4df766011e6d77dcda7a4d75dd5321c1653eaad416bc6c271af43b3
6
+ metadata.gz: 9b6c976adf8f6a38e97efaec67e09fa174d189c15db3783e78c78d6f704741adf1ce69946fb921bf8bbe553c92c0f34d3ef958c7231eb8b6a737c3238fc55a03
7
+ data.tar.gz: d5e3c5310a07a87b64c0f311884bdb83bf9e46212030fbb9504c2380b920b4663fe1032e6671e92e47a32a9f9f76b68e2a8ce2a0ded87058cf2d5542861c539e
data/CHANGELOG CHANGED
@@ -1,3 +1,11 @@
1
+ === 0.5.3 (2014-01-02)
2
+
3
+ * Fix searching by associated object that uses autocompleting (jeremyevans)
4
+
5
+ * Fix autocompletion of associated objecs on new form (jeremyevans)
6
+
7
+ * Remove extra slash in URL when autocompleting (jeremyevans)
8
+
1
9
  === 0.5.2 (2013-12-18)
2
10
 
3
11
  * Use default empty option when picking a many to many association to edit (jeremyevans)
data/autoforme.js CHANGED
@@ -13,7 +13,7 @@ $(function() {
13
13
  var e = $(this);
14
14
  var column = e.data('column');
15
15
  var exclude = e.data('exclude');
16
- var url = base_url + '/autocomplete';
16
+ var url = base_url + 'autocomplete';
17
17
  if (column) {
18
18
  url += '/' + column;
19
19
  }
@@ -68,8 +68,10 @@ module AutoForme
68
68
  if assoc = request.id
69
69
  return false unless model.association?(assoc)
70
70
  @params_association = assoc.to_sym
71
+ @subtype = :association
72
+ else
73
+ @subtype = subtype
71
74
  end
72
- @subtype = subtype
73
75
  return false unless model.autocomplete_options_for(@subtype, request)
74
76
  else
75
77
  return false unless model.supported_action?(normalized_type, request)
@@ -413,7 +415,7 @@ module AutoForme
413
415
  page do
414
416
  Forme.form(model.new(nil, request), form_attributes(:action=>url_for("search/1"), :method=>:get), form_opts) do |f|
415
417
  model.columns_for(:search_form, request).each do |column|
416
- f.input(column, {:name=>column, :id=>column}.merge(column_options_for(:search_form, request, f.obj, column)))
418
+ f.input(column, column_options_for(:search_form, request, f.obj, column).merge(:name=>column, :id=>column))
417
419
  end
418
420
  f.button(:value=>'Search', :class=>'btn btn-primary')
419
421
  end
@@ -1,6 +1,6 @@
1
1
  module AutoForme
2
2
  # Version constant, use <tt>AutoForme.version</tt> instead.
3
- VERSION = '0.5.2'.freeze
3
+ VERSION = '0.5.3'.freeze
4
4
 
5
5
  # Returns the version as a frozen string (e.g. '0.1.0')
6
6
  def self.version
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: autoforme
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.2
4
+ version: 0.5.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeremy Evans
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-12-18 00:00:00.000000000 Z
11
+ date: 2014-01-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: forme