Module: Grape::EndpointExtension
- Defined in:
- lib/grape-active_model_serializers/endpoint_extension.rb
Instance Attribute Summary collapse
-
#controller_name ⇒ Object
Returns the value of attribute controller_name.
Class Method Summary collapse
Instance Method Summary collapse
- #default_serializer_options ⇒ Object
- #namespace_options ⇒ Object
- #render(resources, meta = {}) ⇒ Object
- #route_options ⇒ Object
- #url_options ⇒ Object
Instance Attribute Details
#controller_name ⇒ Object
Returns the value of attribute controller_name.
9 10 11 |
# File 'lib/grape-active_model_serializers/endpoint_extension.rb', line 9 def controller_name @controller_name end |
Class Method Details
.included(base) ⇒ Object
19 20 21 22 23 24 25 26 27 28 |
# File 'lib/grape-active_model_serializers/endpoint_extension.rb', line 19 def self.included(base) mattr_accessor :_serialization_scope self._serialization_scope = :current_user base.class_eval do def serialization_scope send(_serialization_scope) if _serialization_scope && respond_to?(_serialization_scope, true) end end end |
Instance Method Details
#default_serializer_options ⇒ Object
35 |
# File 'lib/grape-active_model_serializers/endpoint_extension.rb', line 35 def ; end |
#namespace_options ⇒ Object
11 12 13 |
# File 'lib/grape-active_model_serializers/endpoint_extension.rb', line 11 def settings[:namespace] ? settings[:namespace]. : {} end |
#render(resources, meta = {}) ⇒ Object
30 31 32 33 |
# File 'lib/grape-active_model_serializers/endpoint_extension.rb', line 30 def render(resources, ={}) () resources end |
#route_options ⇒ Object
15 16 17 |
# File 'lib/grape-active_model_serializers/endpoint_extension.rb', line 15 def [:route_options] end |
#url_options ⇒ Object
37 |
# File 'lib/grape-active_model_serializers/endpoint_extension.rb', line 37 def ; end |