stay 0.1.4.2 → 0.1.4.3
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +1 -1
- data/lib/stay/controller_extensions.rb +2 -2
- data/lib/stay/helper.rb +2 -2
- data/stay.gemspec +3 -3
- metadata +17 -7
data/Rakefile
CHANGED
@@ -2,7 +2,7 @@ require 'rubygems'
|
|
2
2
|
require 'rake'
|
3
3
|
require 'echoe'
|
4
4
|
|
5
|
-
Echoe.new('stay', '0.1.4.
|
5
|
+
Echoe.new('stay', '0.1.4.3') do |p|
|
6
6
|
p.description = "Form ajax helper with tinymce support"
|
7
7
|
p.summary = "Helper for building ajax form, inspired by best_in_place, with some modifications, support tinymce as editor"
|
8
8
|
p.url = "http://github.com/tejanium/stay"
|
@@ -7,13 +7,13 @@ module Stay
|
|
7
7
|
private
|
8
8
|
def response_ok(obj)
|
9
9
|
field = params[obj.class.to_s.underscore].keys.first
|
10
|
-
value = ActionController::Base.helpers.sanitize(obj.send(field.to_sym), tags: %w(p strong em span ul li ol))
|
10
|
+
value = ActionController::Base.helpers.sanitize(obj.send(field.to_sym), tags: %w(p strong em span ul li ol br))
|
11
11
|
render json: { :display => (value.nil? ? "-" : value.to_html), :input => value }, status: :ok
|
12
12
|
end
|
13
13
|
|
14
14
|
def response_error(obj)
|
15
15
|
field = params[obj.class.to_s.underscore].keys.first
|
16
|
-
value = ActionController::Base.helpers.sanitize(obj.send("#{field}_was".to_sym), tags: %w(p strong em span ul li ol))
|
16
|
+
value = ActionController::Base.helpers.sanitize(obj.send("#{field}_was".to_sym), tags: %w(p strong em span ul li ol br))
|
17
17
|
render json: { :display => (value.nil? ? "-" : value.to_html), :input => value, :errors => obj.errors }, status: :unprocessable_entity
|
18
18
|
end
|
19
19
|
end
|
data/lib/stay/helper.rb
CHANGED
@@ -25,7 +25,7 @@ module Stay
|
|
25
25
|
def stay(record, field, opts = {})
|
26
26
|
raise ArgumentError, "Can't have Canceller without Submitter" if opts[:canceller] && opts[:submitter].nil?
|
27
27
|
opts[:type] ||= :text_field
|
28
|
-
html = "<span class='stay' "
|
28
|
+
html = "<span class='stay' id=#{ if opts[:id] }"
|
29
29
|
html << "data-activator='#{ opts[:activator] }' " if opts[:activator]
|
30
30
|
html << "data-submitter='#{ opts[:submitter] }' " if opts[:submitter]
|
31
31
|
html << "data-canceller='#{ opts[:canceller] }' " if opts[:canceller]
|
@@ -37,7 +37,7 @@ module Stay
|
|
37
37
|
if val.nil?
|
38
38
|
html << "-"
|
39
39
|
else
|
40
|
-
html << sanitize(val, tags: %w(p strong em span ul li ol)).to_html
|
40
|
+
html << sanitize(val, tags: %w(p strong em span ul li ol br)).to_html
|
41
41
|
end
|
42
42
|
html << "</span>"
|
43
43
|
html << "<span class='stay-form' style='display:none'>"
|
data/stay.gemspec
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = "stay"
|
5
|
-
s.version = "0.1.4.
|
5
|
+
s.version = "0.1.4.3"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["Teja Sophista"]
|
9
|
-
s.date = "2012-
|
9
|
+
s.date = "2012-05-21"
|
10
10
|
s.description = "Form ajax helper with tinymce support"
|
11
11
|
s.email = "tejanium@yahoo.com"
|
12
12
|
s.extra_rdoc_files = ["README.md", "README.rdoc", "lib/assets/javascripts/stay.js", "lib/stay.rb", "lib/stay/controller_extensions.rb", "lib/stay/engine.rb", "lib/stay/helper.rb", "lib/stay/string_extensions.rb"]
|
@@ -15,7 +15,7 @@ Gem::Specification.new do |s|
|
|
15
15
|
s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Stay", "--main", "README.md"]
|
16
16
|
s.require_paths = ["lib"]
|
17
17
|
s.rubyforge_project = "stay"
|
18
|
-
s.rubygems_version = "1.8.
|
18
|
+
s.rubygems_version = "1.8.24"
|
19
19
|
s.summary = "Helper for building ajax form, inspired by best_in_place, with some modifications, support tinymce as editor"
|
20
20
|
|
21
21
|
if s.respond_to? :specification_version then
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: stay
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.4.
|
4
|
+
version: 0.1.4.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-05-21 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: jquery-rails
|
16
|
-
requirement:
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,15 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements:
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ! '>='
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '0'
|
25
30
|
- !ruby/object:Gem::Dependency
|
26
31
|
name: tinymce-rails
|
27
|
-
requirement:
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
28
33
|
none: false
|
29
34
|
requirements:
|
30
35
|
- - ! '>='
|
@@ -32,7 +37,12 @@ dependencies:
|
|
32
37
|
version: '0'
|
33
38
|
type: :runtime
|
34
39
|
prerelease: false
|
35
|
-
version_requirements:
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ! '>='
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '0'
|
36
46
|
description: Form ajax helper with tinymce support
|
37
47
|
email: tejanium@yahoo.com
|
38
48
|
executables: []
|
@@ -84,7 +94,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
84
94
|
version: '1.2'
|
85
95
|
requirements: []
|
86
96
|
rubyforge_project: stay
|
87
|
-
rubygems_version: 1.8.
|
97
|
+
rubygems_version: 1.8.24
|
88
98
|
signing_key:
|
89
99
|
specification_version: 3
|
90
100
|
summary: Helper for building ajax form, inspired by best_in_place, with some modifications,
|