Class: Notee::StatusesController

Inherits:
ApplicationController show all
Defined in:
app/controllers/notee/statuses_controller.rb

Instance Method Summary collapse

Methods inherited from ApplicationController

#restrict_access_json, #set_request_filter

Instance Method Details

#indexObject



6
7
8
9
# File 'app/controllers/notee/statuses_controller.rb', line 6

def index
  @statuses = Notee::STATUS
  render json: { status: 'success', statuses: @statuses }
end

#showObject



11
12
13
14
15
# File 'app/controllers/notee/statuses_controller.rb', line 11

def show
  statuses = Notee::STATUS
  @status = statuses.key(params[:status].to_i)
  render json: { status: 'success', name: @status }
end