Class: Api::V1::PlantsController

Inherits:
BaseController show all
Defined in:
app/controllers/api/v1/plants_controller.rb

Overview

Plants API permits to access plants

Instance Method Summary collapse

Methods inherited from BaseController

#add_generic_headers!, #authenticate_api_user!, #authenticate_user_from_simple_token!, #force_json!

Instance Method Details

#indexObject


5
6
7
# File 'app/controllers/api/v1/plants_controller.rb', line 5

def index
  render json: Plant.order(id: :desc).limit(25), status: :ok
end