x-editable-rails 1.2.1 → 1.2.2

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: e753707909ca94abaf54db4a9e66512d610d5cfc
4
- data.tar.gz: 923bc056c6ef1c9b3bbcac97cf935e6139b6027f
3
+ metadata.gz: f6fdf15b9dba5e939debe9387b5a18fbf5303249
4
+ data.tar.gz: 5a05eb8fc0b7217d406745d0e9bb7675f713428a
5
5
  SHA512:
6
- metadata.gz: 5d897bb0d03c8848b4406c846dd26241961549e1c061c846eb90358be7747ab9f962a681710389245151375bca2295e21dec73250a9b2a8e90e954b2804e4967
7
- data.tar.gz: 7af741f2362298821b2f83089f87246eeaf902c2020a29fef65ac33330c498cad1ba3a154c6ce5ffcea99823a4ef64f1180a9d99e23665ae1180eefe28aa53da
6
+ metadata.gz: e748ea5acba0ede342cba31f235e8635eda1793a5243859c8367d2e2ce4536cecf2ad75e70d707592121a4070b50508679a0e73ca99ffa8f4b9d62df16e870ef
7
+ data.tar.gz: 46ed0d36e34c70202979fac240806f5703b74e6c368229c469ca858d335eb16d2afa856e23e4d522286bacb953249029da8f230d8c4d43772587f3567f5ad4a0
data/README.md CHANGED
@@ -49,19 +49,19 @@ end
49
49
  and this is how to use helper method
50
50
 
51
51
  ```ruby
52
- %h1= editable @page, 'name', e: @page.name
52
+ %h1= editable @page, :name, e: @page.name
53
53
  # editable object, what_you_want_update, e: exception - when is xeditable? false or can? :edit, object is false
54
54
  ```
55
55
 
56
56
  or with nested attributes (globalize3 example)
57
57
  ```ruby
58
- %h1= editable @page, 'name', nested: 'translations', nid: @page.translation.id, e: @page.name
58
+ %h1= editable @page, :name, nested: :translations, nid: @page.translation.id, e: @page.name
59
59
  # nested: nested attributes, nid: id of nested attribute
60
60
  ```
61
61
 
62
62
  Example of nested resource
63
63
  ```ruby
64
- %h1= editable [picture.gallery, picture], 'name', nested: 'translations', nid: picture.translation.id, e: picture.name
64
+ %h1= editable [picture.gallery, picture], :name, nested: :translations, nid: picture.translation.id, e: picture.name
65
65
  ```
66
66
 
67
67
  You can also update everything directly.
@@ -1,7 +1,7 @@
1
1
  module X
2
2
  module Editable
3
3
  module Rails
4
- VERSION = "1.2.1"
4
+ VERSION = "1.2.2"
5
5
  end
6
6
  end
7
7
  end
@@ -9,7 +9,7 @@ module X
9
9
  model = object.class.to_s.downcase
10
10
  model_param = model.gsub('::', '_')
11
11
  model_name = model.gsub('::', '/')
12
- klass = options[:nested] ? object.class.const_get(options[:nested].singularize.capitalize) : object.class
12
+ klass = options[:nested] ? object.class.const_get(options[:nested].to_s.singularize.capitalize) : object.class
13
13
  content_tag :a, href: "#", class: "editable",
14
14
  data: {
15
15
  type: 'text',
@@ -22,7 +22,7 @@ jQuery ($) ->
22
22
  obj[nestedName + '_attributes'] = nested
23
23
  else
24
24
  obj[myName] = myValue
25
- params[model] = obj
25
+ params[model] = obj
26
26
  delete params.name
27
27
  delete params.value
28
28
  delete params.pk
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: x-editable-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.1
4
+ version: 1.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jiri Kolarik
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-09-14 00:00:00.000000000 Z
11
+ date: 2013-09-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler