Class: Plug::Api::FeaturesController
- Inherits:
-
ApiController
- Object
- ActionController::Base
- ApiController
- Plug::Api::FeaturesController
- Defined in:
- app/controllers/plug/api/features_controller.rb
Instance Method Summary collapse
-
#index ⇒ Object
GET /features.json.
-
#show ⇒ Object
GET /features/slug.json.
Instance Method Details
#index ⇒ Object
GET /features.json
7 8 9 10 11 |
# File 'app/controllers/plug/api/features_controller.rb', line 7 def index @features = Feature.all render json: @features end |
#show ⇒ Object
GET /features/slug.json
14 15 16 17 18 |
# File 'app/controllers/plug/api/features_controller.rb', line 14 def show @feature = Feature.slug_and_name(params[:slug]).first render json: @feature end |