FarmBot/Farmbot-Web-App

View on GitHub
app/controllers/api/global_bulletins_controller.rb

Summary

Maintainability
A
0 mins
Test Coverage
module Api
  class GlobalBulletinsController < Api::AbstractController
    skip_before_action :authenticate_user!
    skip_before_action :check_fbos_version

    def show
      render json: search_results
    end

    private

    def search_results
      @search_results ||= GlobalBulletin.find_by(slug: params[:id])
    end
  end
end