abstracted 0.4.7 → 0.4.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3fc510cfc36e43cc0b9d4f5cb005d5f84fb50943
|
|
4
|
+
data.tar.gz: 2f6870ea08bfc4218e468fa699570ae84adf768f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a1e7e778189441c54acc02bcdea7138be8c1521659081c3faa1fbadcce88598eafd738b7bfc7b9655e42d10b78246fc5500beea37d09aaedd08997633fa972ef
|
|
7
|
+
data.tar.gz: 39d985e9b7b8de4240a28e0518e3775dc7d4ac890b2ebb2741aa75887229c56744938e4d49dc19058165323413221d0a946fb2dc06197a6d3c24ac4df025ffe7
|
|
@@ -107,7 +107,7 @@ module ResourceControl
|
|
|
107
107
|
def resources_url options={}
|
|
108
108
|
r=request.path
|
|
109
109
|
options = case params[:action]
|
|
110
|
-
when 'create','update','delete','destroy';
|
|
110
|
+
when 'create','update','delete','destroy'; ""
|
|
111
111
|
else resource_options(options)
|
|
112
112
|
end
|
|
113
113
|
return "%s%s" % [r,options] if r.match "#{resource.class.to_s.tableize}$"
|
|
@@ -116,9 +116,9 @@ module ResourceControl
|
|
|
116
116
|
scoop_from_error e
|
|
117
117
|
end
|
|
118
118
|
|
|
119
|
-
def resource_options options
|
|
119
|
+
def resource_options options={}
|
|
120
120
|
options.merge! params.except( "id", "controller", "action", "utf8", "_method", "authenticity_token" )
|
|
121
|
-
options
|
|
121
|
+
options.empty? ? "" : "?" + options.collect{ |k,v| "#{k}=#{v}" }.join("&")
|
|
122
122
|
end
|
|
123
123
|
|
|
124
124
|
#
|
data/lib/abstracted/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: abstracted
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.4.
|
|
4
|
+
version: 0.4.8
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Walther H Diechmann
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2016-05-
|
|
11
|
+
date: 2016-05-26 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|
|
@@ -581,7 +581,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
581
581
|
version: '0'
|
|
582
582
|
requirements: []
|
|
583
583
|
rubyforge_project:
|
|
584
|
-
rubygems_version: 2.
|
|
584
|
+
rubygems_version: 2.4.5
|
|
585
585
|
signing_key:
|
|
586
586
|
specification_version: 4
|
|
587
587
|
summary: Abstracted DRY's up your controllers totally
|