Module: RestHelper

Defined in:
app/helpers/rest_helper.rb

Instance Method Summary collapse

Instance Method Details

#embed_response_with(value) ⇒ Object

Returns Boolean.

Returns:

  • Boolean



10
11
12
13
14
# File 'app/helpers/rest_helper.rb', line 10

def embed_response_with(value)
  if p = params.dig(:embed)
    return p.include?(value)
  end
end

#exclude_from_response(value) ⇒ Object



16
17
18
19
20
# File 'app/helpers/rest_helper.rb', line 16

def exclude_from_response(value)
  if p = params.dig(:exclude)
    return p.include?(value)
  end
end

#extend_response_with(value) ⇒ Object

Returns Boolean.

Returns:

  • Boolean



3
4
5
6
7
# File 'app/helpers/rest_helper.rb', line 3

def extend_response_with(value)
  if p = params.dig(:extend)
    return p.include?(value)
  end
end