title: ActiveModel Serializer - Passing params to serializers
body: <p><strong>AMS version: 0.9.7</strong></p>
  <p>I am trying to pass a parameter to an ActiveModel serializer without any luck.</p>
  <p>My (condensed) controller:</p>
  <pre><code>class V1::WatchlistsController &lt; ApplicationController
    
     def index
       currency = params[:currency]
       @watchlists = Watchlist.belongs_to_user(current_user)
       render json: @watchlists, each_serializer: WatchlistOnlySerializer
     end
  </code></pre>
  <p>My serializer:</p>
  <pre><code>class V1::WatchlistOnlySerializer &lt; ActiveModel::Serializer
    attributes :id, :name, :created_at, :market_value
    attributes :id
  
    
    def filter(keys)
      keys = {} if object.active == false 
      keys
    end 
    
    private
  
    def market_value
      # this is where I'm trying to pass the parameter
      currency = &quot;usd&quot;
      Balance.watchlist_market_value(self.id, currency)
    end
  </code></pre>
  <p>I am trying to pass a parameter <code>currency</code> from the controller to the serializer to be used in the <code>market_value</code> method (which in the example is hard-coded as &quot;usd&quot;).</p>
  <p>I've tried @options and @instance_options but I cant seem to get it work. Not sure if its just a syntax issue.</p>