x-editable-rails 0.0.1 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -33,7 +33,7 @@ You can choose between bootstrap/jqueryui/jquery and inline version
33
33
  And this to your stylesheets
34
34
 
35
35
  ```scss
36
- *= require bootstra-editable
36
+ *= require bootstrap-editable
37
37
  ```
38
38
 
39
39
  Choose between bootstrap/jqueryui/jquery
@@ -60,6 +60,11 @@ When updating nested attributes also:
60
60
  1. data-nested
61
61
  2. data-nid
62
62
 
63
+ And don't forget to activate it
64
+ ```coffee
65
+ $('.editable').editable()
66
+ ```
67
+
63
68
  ## Contributing
64
69
 
65
70
  1. Fork it
@@ -1,7 +1,7 @@
1
1
  module X
2
2
  module Editable
3
3
  module Rails
4
- VERSION = "0.0.1"
4
+ VERSION = "0.0.3"
5
5
  end
6
6
  end
7
7
  end
@@ -6,14 +6,16 @@ jQuery ($) ->
6
6
  nestedName = @options.nested
7
7
  nestedId = @options.nid
8
8
  @options.url = (params) =>
9
+ myName = params.name
10
+ myValue = params.value.replace(/(\r\n|\n|\r)/gm,"<br/>")
9
11
  obj = {}
10
12
  if nestedName
11
13
  nested = {}
12
- nested[params.name] = params.value
14
+ nested[myName] = myValue
13
15
  nested['id'] = nestedId
14
16
  obj[nestedName + '_attributes'] = nested
15
17
  else
16
- obj[params.name] = params.value
18
+ obj[myName] = myValue
17
19
  params[model] = obj
18
20
  delete params.name
19
21
  delete params.value
metadata CHANGED
@@ -1,23 +1,33 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: x-editable-rails
3
- version: !ruby/object:Gem::Version
4
- version: 0.0.1
5
- prerelease:
3
+ version: !ruby/object:Gem::Version
4
+ prerelease: false
5
+ segments:
6
+ - 0
7
+ - 0
8
+ - 3
9
+ version: 0.0.3
6
10
  platform: ruby
7
- authors:
11
+ authors:
8
12
  - Jiri Kolarik
9
13
  autorequire:
10
14
  bindir: bin
11
15
  cert_chain: []
12
- date: 2012-12-26 00:00:00.000000000 Z
16
+
17
+ date: 2012-12-29 00:00:00 +01:00
18
+ default_executable:
13
19
  dependencies: []
20
+
14
21
  description: X-editable for Rails
15
- email:
22
+ email:
16
23
  - jiri.kolarik@imin.cz
17
24
  executables: []
25
+
18
26
  extensions: []
27
+
19
28
  extra_rdoc_files: []
20
- files:
29
+
30
+ files:
21
31
  - .gitignore
22
32
  - Gemfile
23
33
  - LICENSE.txt
@@ -43,28 +53,35 @@ files:
43
53
  - vendor/assets/stylesheets/jquery-editable.css
44
54
  - vendor/assets/stylesheets/jqueryui-editable.css
45
55
  - x-editable-rails.gemspec
46
- homepage: ''
56
+ has_rdoc: true
57
+ homepage: ""
47
58
  licenses: []
59
+
48
60
  post_install_message:
49
61
  rdoc_options: []
50
- require_paths:
62
+
63
+ require_paths:
51
64
  - lib
52
- required_ruby_version: !ruby/object:Gem::Requirement
53
- none: false
54
- requirements:
55
- - - ! '>='
56
- - !ruby/object:Gem::Version
57
- version: '0'
58
- required_rubygems_version: !ruby/object:Gem::Requirement
59
- none: false
60
- requirements:
61
- - - ! '>='
62
- - !ruby/object:Gem::Version
63
- version: '0'
65
+ required_ruby_version: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - ">="
68
+ - !ruby/object:Gem::Version
69
+ segments:
70
+ - 0
71
+ version: "0"
72
+ required_rubygems_version: !ruby/object:Gem::Requirement
73
+ requirements:
74
+ - - ">="
75
+ - !ruby/object:Gem::Version
76
+ segments:
77
+ - 0
78
+ version: "0"
64
79
  requirements: []
80
+
65
81
  rubyforge_project:
66
- rubygems_version: 1.8.24
82
+ rubygems_version: 1.3.6
67
83
  signing_key:
68
84
  specification_version: 3
69
85
  summary: X-editable for Rails
70
86
  test_files: []
87
+