cyrax 0.3.0.pre2 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/cyrax/helpers/controller.rb +2 -1
- data/lib/cyrax/presenters/base_collection.rb +3 -3
- data/lib/cyrax/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
YzU3YmM0Nzg2NzIzY2ZiYTZiOGFiYzJjYjYzNTE1Y2ZiNDFjOThjOA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
Mjc3MGVjZjhhZGExZTI3MjAyODZkMzZjZGRjNTJiY2U5N2I1YzgwOQ==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
YzEyZjJiMzc2NWVkYjk4NDdmYzU2ZTRmYjQ1NDhlNTVkZjdlYWUwODRiN2Q5
|
10
|
+
Y2ViN2QyZGJiMTk3MTlkYjllYTc2NzEyZDZmZjE0MzVkNDFiYTI0MjA0NzA0
|
11
|
+
NzViOWIwZTdhZWRmNzFjY2UwODU4NjA1NjA1MjczMDc0ZTM5ZTI=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NTdlZTYwNDlhYjE3YTMwZGE4ZGRhM2FkN2M1ZmI3NTM4NGI2ZmIzOWM2Njg2
|
14
|
+
ZGM2ZmQ2YjA4MmFiOWFjYTk5ODZkZGIwZDYxNmQ0YjI2MGMyMTdkZmYwYWE2
|
15
|
+
ZGVkOTlhZWRhYjU3YTBjNzhkMTA2YWE5MTMwMGNhZDdhOWM2Mzc=
|
@@ -8,6 +8,7 @@ module Cyrax::ControllerHelper
|
|
8
8
|
}
|
9
9
|
set_resource_from(response)
|
10
10
|
flash[:notice] = response.notice if response.notice.present?
|
11
|
+
flash[:error] = response.error if response.error.present?
|
11
12
|
|
12
13
|
# convert result to model if possible
|
13
14
|
result = response.result
|
@@ -25,4 +26,4 @@ module Cyrax::ControllerHelper
|
|
25
26
|
instance_variable_set("@#{key}", value)
|
26
27
|
end if response.assignments.present? && response.assignments.is_a?(Hash)
|
27
28
|
end
|
28
|
-
end
|
29
|
+
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
module Cyrax::Presenters
|
2
2
|
class BaseCollection
|
3
3
|
attr_reader :collection, :options
|
4
|
-
|
4
|
+
|
5
5
|
def initialize(collection, options = {})
|
6
6
|
@collection = collection
|
7
7
|
@options = options
|
@@ -20,7 +20,7 @@ module Cyrax::Presenters
|
|
20
20
|
end
|
21
21
|
end
|
22
22
|
|
23
|
-
def as_json
|
23
|
+
def as_json(*args)
|
24
24
|
if options[:serializer]
|
25
25
|
options[:serializer].new(presented_collection).serialize
|
26
26
|
else
|
@@ -33,4 +33,4 @@ module Cyrax::Presenters
|
|
33
33
|
collection.send(method, *args, &block)
|
34
34
|
end
|
35
35
|
end
|
36
|
-
end
|
36
|
+
end
|
data/lib/cyrax/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cyrax
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.0
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Droidlabs
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-10-
|
11
|
+
date: 2013-10-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -121,9 +121,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
121
121
|
version: '0'
|
122
122
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
123
123
|
requirements:
|
124
|
-
- - ! '
|
124
|
+
- - ! '>='
|
125
125
|
- !ruby/object:Gem::Version
|
126
|
-
version:
|
126
|
+
version: '0'
|
127
127
|
requirements: []
|
128
128
|
rubyforge_project:
|
129
129
|
rubygems_version: 2.0.5
|