Module: Lydia::Helpers
- Included in:
- Application
- Defined in:
- lib/lydia/helpers.rb
Instance Method Summary collapse
- #content_type(content) ⇒ Object
- #params ⇒ Object
- #redirect(target, status = 302) ⇒ Object
- #send_file(_path, _mime_type = nil) ⇒ Object
Instance Method Details
#content_type(content) ⇒ Object
3 4 5 |
# File 'lib/lydia/helpers.rb', line 3 def content_type(content) @response.header['Content-Type'] = content end |
#params ⇒ Object
11 12 13 |
# File 'lib/lydia/helpers.rb', line 11 def params @request.params end |
#redirect(target, status = 302) ⇒ Object
7 8 9 |
# File 'lib/lydia/helpers.rb', line 7 def redirect(target, status = 302) [status, target] end |
#send_file(_path, _mime_type = nil) ⇒ Object
15 16 17 |
# File 'lib/lydia/helpers.rb', line 15 def send_file(_path, _mime_type = nil) raise(NotImplementedError, 'Send file not yet implemented.') end |