Class: Notee::StatusesController

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

Instance Method Summary collapse

Instance Method Details

#indexObject



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

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

#showObject



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

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