x-editable-rails 1.0.0 → 1.0.1

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: bbe50036012ac8000cdc362d6edb033b34164062
4
- data.tar.gz: 050ffa1e9e08bb2a10a5a629a5ddb7c891acf646
3
+ metadata.gz: a6973ae156c26b7db1083c3215edbbd16c9acae2
4
+ data.tar.gz: fc3914f001cbaa43658d451ee78ae126fa404e71
5
5
  SHA512:
6
- metadata.gz: 3f243311dc4c6eb271e449319848fc3c3f3fb2a8171ce0d02dc5f0359f35389edc5abe387d0a171ac4df91cabfd448cbe82f8bdc00e75b18e584258c86264589
7
- data.tar.gz: 713a1712467ffd4ea40965caa00af5365fff875258e00fe3e3933b5db3f9989c28fa1f4d4880a091fc7b97061050603ba0885addaaa4c026c13eebb15174a40c
6
+ metadata.gz: e76220eafc1289c9c13d1a1a62d74dd639d060b100197759d6529f6101f2000f81e2772d77c8428ea891138cb961008ae44df3bd71ccb2fad347b849c5e3b2d6
7
+ data.tar.gz: 9a2a5146c291a0603f6aea94299d1a875087722850925ae294ce3aa98d9e3f9cdf59acd908a5ab474c34033adab637ab5023f9e6a3b5939a479323e94cf3e29b
@@ -1,7 +1,7 @@
1
1
  module X
2
2
  module Editable
3
3
  module Rails
4
- VERSION = "1.0.0"
4
+ VERSION = "1.0.1"
5
5
  end
6
6
  end
7
7
  end
@@ -4,9 +4,10 @@ module X
4
4
  module ViewHelpers
5
5
  def editable model, object, method, options = {}
6
6
  if can? :edit, model and xeditable?
7
- model_name = model.to_s.downcase
7
+ model_param = model.to_s.downcase.gsub('::', '_')
8
+ model_name = model.to_s.downcase.gsub('::', '/')
8
9
  data_url = options[:nested_model] ? polymorphic_path([options[:nested_model], object]) : polymorphic_path(object)
9
- content_tag :a, href: "#", class: "editable", data: { type: 'text', model: model_name, name: method, url: data_url,
10
+ content_tag :a, href: "#", class: "editable", data: { type: 'text', model: model_param, name: method, url: data_url,
10
11
  nested: (options[:nested] if options[:nested]), nid: (options[:nid] if options[:nid]), 'original-title' => t("activerecord.attributes.#{model_name}#{"/#{options[:nested].singularize}" if options[:nested]}.#{method}") } do
11
12
  object.send(method)
12
13
  end
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.0.0
4
+ version: 1.0.1
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-07-01 00:00:00.000000000 Z
11
+ date: 2013-07-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler