kindred-rails 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +6 -0
- data/app/assets/javascripts/models/base.coffee +4 -19
- data/lib/kindred/rails/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 82c11eac01671c55ee2ed6a38b1a82c3dece3b2d
|
4
|
+
data.tar.gz: 56d783e74559622d703f5611fe5ba8d794b43ec2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2093d4fcbd6a7c835339301961ed1cff78572a7746622046426ef83e46d79dd63a5dd0f9c5cfcd44e4d522adf2f191590e91a16480e406b8217e016bfb37ea53
|
7
|
+
data.tar.gz: 8572ed4fc37dc71aebfaa86e1fd0807643ddbccae8fb85d93c58b410cd5911220a762a1f029672a7c95abdd9efe02f771d1d50c92a187ae1d5b1b28489c4231d
|
data/README.md
CHANGED
@@ -38,6 +38,12 @@ Add `gem "kindred"` to gemfile
|
|
38
38
|
|
39
39
|
Add `//= require kindred` to application.js manifest
|
40
40
|
|
41
|
+
Change your asset pipeline configuration to prevent uglifying of JS class names:
|
42
|
+
|
43
|
+
```ruby
|
44
|
+
Rails.application.config.assets.js_compressor = Uglifier.new(mangle: false)
|
45
|
+
```
|
46
|
+
|
41
47
|
## Demo
|
42
48
|
|
43
49
|
If you would like to see kindred in action check out [kindred-demo](https://kindred-demo.herokuapp.com/invoices/1/edit).
|
@@ -20,15 +20,8 @@ class App.Base extends App.VirtualClass App.ActivePage, App.Setup
|
|
20
20
|
opts.add_data_to_each[attribute]
|
21
21
|
)
|
22
22
|
|
23
|
-
|
24
|
-
|
25
|
-
# Put passes through data. Patch dosn't.
|
26
|
-
if (userAgent = window?.navigator?.userAgent).match /capybara-webkit/ || userAgent.match /PhantomJS/
|
27
|
-
path = @route + "/save_all.json"
|
28
|
-
method = 'PUT'
|
29
|
-
else
|
30
|
-
path = @route + "/save_all.json"
|
31
|
-
method = 'PUT'
|
23
|
+
path = @route + "/save_all.json"
|
24
|
+
method = 'PUT'
|
32
25
|
|
33
26
|
$.ajax
|
34
27
|
type: method
|
@@ -57,16 +50,8 @@ class App.Base extends App.VirtualClass App.ActivePage, App.Setup
|
|
57
50
|
|
58
51
|
save: ->
|
59
52
|
if !isNaN(parseFloat(@id)) && isFinite(@id)
|
60
|
-
|
61
|
-
|
62
|
-
# This conditonal is for testing but there is no easy fix at the moment.
|
63
|
-
# Put passes through data. Patch dosn't.
|
64
|
-
if (userAgent = window?.navigator?.userAgent).match /capybara-webkit/ || userAgent.match /PhantomJS/
|
65
|
-
path = @route + "/" + @id + ".json"
|
66
|
-
method = 'PUT'
|
67
|
-
else
|
68
|
-
path = @route + "/" + @id + ".json"
|
69
|
-
method = 'PATCH'
|
53
|
+
path = @route + "/" + @id + ".json"
|
54
|
+
method = 'PUT'
|
70
55
|
else
|
71
56
|
path = @route + ".json"
|
72
57
|
method = "POST"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kindred-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mike Piccolo
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-01-
|
11
|
+
date: 2015-01-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|