znamenica/dneslov

View on GitHub
app/controllers/api/v1/calendaries_controller.rb

Summary

Maintainability
A
0 mins
Test Coverage
class Api::V1::CalendariesController < Api::CommonController
   def objects
      @objects ||=
         Calendary.licit_with(params[:c])
                  .with_title(locales)
                  .with_description(locales)
                  .with_url
                  .with_slug_text
                  .group("calendaries.id")
                  .distinct_by('_slug')
   end
end