6

I'm trying to do something like this:

cache "api/v1/cars_index/#{I18n.locale}/car/#{car.cache_key}" do
  attributes :id, :brand, :model_name, :fuel, :km, :year, :price
  node(:color) { |car| car.color.present? ? car.color : '' }
end
mu is too short
  • 426,620
  • 70
  • 833
  • 800
Niels Kristian
  • 8,661
  • 11
  • 59
  • 117

1 Answers1

3

For those people who finds this question through a search or google.

Niels started an issue on Github which can be found here.

A developer created a great solution for this which has been merged into rabl since v0.6.2.

Lisinge
  • 2,017
  • 2
  • 27
  • 44