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