on_the_spot 1.0.6 → 1.1.0

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: 51757cdc9d29fea0cfb496f571c20503bc18addd
4
- data.tar.gz: c9abf4e102543f6b6ddcd0abac23348ea075a6a6
3
+ metadata.gz: 370318b36103fa6ec091d79b7242dbc966526af7
4
+ data.tar.gz: 68b85da5d3b5b5f8ad7de4a1487a5ec851b3f635
5
5
  SHA512:
6
- metadata.gz: 2c3372aab107fc7e35ec813171e2dcdf8176a4c37e8ed97838c36a19c0f91d1477927a44f3a29ee4576a5be00b37d9de24070d13e39321a6b79018a8e465c0c8
7
- data.tar.gz: 92b672e3c547f22b8f6f931a96e7c14f466f30142cd96087e031c93915b2ce70558b1cbcf3ac29836282d9d7c16e0448f79284644406e358e010e6ae61c87223
6
+ metadata.gz: 71d2138193d6da19a31f66a50e4e93be09976aa4299271047e1ee75aa93aa3d73ed4423167684258b0f754391a1817fe4687efe1b2bcfcc6370d9ad07ac91176
7
+ data.tar.gz: 029d0d28b854371b7b15d91f8f14c380698076fc523aceb7d5426a6824511cd59185189a9f8c6c92c7bdcb48d509fe9fb27b5795c9f42e3749de69a3d300c9a7
@@ -2,7 +2,7 @@
2
2
 
3
3
  [![Build Status](http://travis-ci.org/nathanvda/on_the_spot.png)](http://travis-ci.org/nathanvda/on_the_spot)
4
4
 
5
- On-the-spot is a Rails3 compliant unobtrusive javascript in-place-editing plugin, using jEditable, and depends on jQuery.
5
+ On-the-spot is a Rails3+ compliant unobtrusive javascript in-place-editing plugin, using jEditable, and depends on jQuery.
6
6
 
7
7
  ## Features
8
8
 
@@ -27,7 +27,7 @@ Run the installation task:
27
27
 
28
28
  This will copy the default translation files, and for rails 3.0 it will also copy the needed assets (javascript files).
29
29
 
30
- ### Rails 3.1
30
+ ### Rails 3.1+/4/5
31
31
 
32
32
  Add the following to application.js so it compiles to the asset_pipeline
33
33
 
@@ -46,6 +46,17 @@ Or, inside your `application.html.haml` you could still include the needed css,
46
46
  = stylesheet_link_tag :on_the_spot
47
47
 
48
48
 
49
+ ### Rails 3.x
50
+
51
+ > Breaking changes: since rails 5 render :text is deprecated and removed, this means that starting from 1.1.0
52
+ > this gem is no longer compatible with rails 3, but is compatible with rails 4 and 5.
53
+ > So if you are still using rails 3.x you need the fixate the version to `1.0.6`
54
+
55
+
56
+ gem 'on_the_spot', '1.0.6'
57
+
58
+
59
+
49
60
  ### Rails 3.0.x
50
61
 
51
62
  Inside your `application.html.haml` you will need to add below the default javascripts:
@@ -65,7 +76,7 @@ or using erb, you write
65
76
  <%= stylesheet_link_tag :on_the_spot %>
66
77
 
67
78
 
68
- ### Routes (for all Rails 3 versions)
79
+ ### Routes (for all Rails versions)
69
80
 
70
81
  Inside your `routes.rb` you need to provide the following route :
71
82
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.6
1
+ 1.1.0
@@ -35,16 +35,16 @@ module OnTheSpot
35
35
  value = object.send(field).to_s
36
36
  params[:raw] ? value : CGI::escapeHTML(value)
37
37
  end
38
- render :text => field_or_method
38
+ render :plain => field_or_method
39
39
  else
40
40
  parsed_data = JSON.parse(select_data.gsub("'", '"').gsub('\"', "'"))
41
- render :text => parsed_data[object.send(field).to_s]
41
+ render :plain => parsed_data[object.send(field).to_s]
42
42
  end
43
43
  else
44
- render :text => object.errors.full_messages.join("\n"), :status => 422
44
+ render :plain => object.errors.full_messages.join("\n"), :status => 422
45
45
  end
46
46
  else
47
- render :text => t('on_the_spot.access_not_allowed'), :status => 422
47
+ render :plain => t('on_the_spot.access_not_allowed'), :status => 422
48
48
  end
49
49
  end
50
50
 
@@ -56,9 +56,9 @@ module OnTheSpot
56
56
  is_allowed = check_acces_method.present? ? self.send(check_acces_method, object, field) : true
57
57
 
58
58
  if is_allowed
59
- render :text => object.send(field)
59
+ render :plain => object.send(field)
60
60
  else
61
- render :text => t('on_the_spot.access_not_allowed'), :status => 422
61
+ render :plain => t('on_the_spot.access_not_allowed'), :status => 422
62
62
  end
63
63
  end
64
64
  end
@@ -2,16 +2,16 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: on_the_spot 1.0.6 ruby lib
5
+ # stub: on_the_spot 1.1.0 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "on_the_spot"
9
- s.version = "1.0.6"
9
+ s.version = "1.1.0"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib"]
13
13
  s.authors = ["Nathan Van der Auwera"]
14
- s.date = "2017-04-19"
14
+ s.date = "2018-03-18"
15
15
  s.description = "Unobtrusive in place editing, using jEditable; only works in Rails 3"
16
16
  s.email = "nathan@dixis.com"
17
17
  s.extra_rdoc_files = [
@@ -84,7 +84,7 @@ Gem::Specification.new do |s|
84
84
  ]
85
85
  s.homepage = "http://github.com/nathanvda/on_the_spot"
86
86
  s.licenses = ["MIT"]
87
- s.rubygems_version = "2.4.6"
87
+ s.rubygems_version = "2.4.5"
88
88
  s.summary = "unobtrusive in place editing"
89
89
 
90
90
  if s.respond_to? :specification_version then
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: on_the_spot
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.6
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nathan Van der Auwera
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-04-19 00:00:00.000000000 Z
11
+ date: 2018-03-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
@@ -142,7 +142,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
142
142
  version: '0'
143
143
  requirements: []
144
144
  rubyforge_project:
145
- rubygems_version: 2.4.6
145
+ rubygems_version: 2.4.5
146
146
  signing_key:
147
147
  specification_version: 4
148
148
  summary: unobtrusive in place editing