How to Pass options in acts_as_api
===

I have a rails application where Posts are created and liked by users. I am using acts_as_api gem to build the JSON for it and want to show whether or not the current user liked the post or not. And I am not able to find how to pass options to acts_as_api template. I want to pass the devise current_user helper method to the template. The below gist (taken from [here][1]) has the code on how to use options. But it's written for Ruby 1.9.3 I guess, how can I write it in REE 1.8.7?

    class Shop < ActiveRecord::Base
        acts_as_api
    
        api_accessible :detail do |t| 
          t.add :name
          t.add ->(model,options) { model.calc_distance(options[:loc] },    as: :distance
          t.add :long_long_desc,   if: ->(model,options) { options[:with_long_long_desc] }
        end 
    end 
    
    def calc_distance(loc)
        ## calculating......
    end 

And calling the API template

    shop = Shop.find(params[:id])
    
    # options with loc , here the [12,13] will pass to the calc_distance method
    result_hash = shop.as_api_response :detail, loc: [12,13] 
    
    # options with show long_long_desc flag
    result_hash = shop.as_api_response :detail, with_long_long_desc: params[:with_long_long_desc]


  [1]: https://gist.github.com/1c8d5b1597fdab4fed91/a930ffc02a4ca12f331760ebfd6ab3f4cbb54d3b