Class: Api::V1::Google::ReviewsController

Inherits:
BaseController
  • Object
show all
Defined in:
app/controllers/api/v1/google/reviews_controller.rb

Instance Method Summary collapse

Instance Method Details

#indexObject



3
4
5
6
7
8
9
10
11
12
# File 'app/controllers/api/v1/google/reviews_controller.rb', line 3

def index
  if locale = get_locale
    res = Feed::Google::ReviewGenerator.new.process(limit: params[:limit].presence, locale: locale)
    self.content_type = 'text/xml'
    render xml: res.output
  else
    self.response_body =  "Locale not set"
    self.status = 404
  end
end