class Ferver::Controller

Attributes

ferver_list[R]

Private Instance Methods

current_ferver_path() click to toggle source
# File lib/ferver/controller.rb, line 61
def current_ferver_path
  Ferver.configuration.directory.path
end
current_full_path() click to toggle source
# File lib/ferver/controller.rb, line 65
def current_full_path
  Ferver.configuration.directory.full_path
end
find_file!(file_id) click to toggle source
# File lib/ferver/controller.rb, line 51
def find_file!(file_id)
  ferver_list.file_by_id(file_id)
rescue Ferver::FileNotFoundError => error
  halt 404, error.message
end
json_request?() click to toggle source
# File lib/ferver/controller.rb, line 57
def json_request?
  request.preferred_type.to_s == "application/json"
end