How about construct a class CoktailList that fetch and store the records from database as a hash in a instance variable, and delegate the  method to that variable?
Just to add a example of implementation:
def initialize(scope = :all)
@list = Cocktail.send(scope).index_by(&:name)
# put any desirable hash method here
delegate :size, :keys, :values, :each, :, to: :@list
@cocktail_list = CocktailList.new # or CocktailList.new(:for_sale)
<%= @cocktail_list["Margarita"] %>
Ooh that would be clean too!
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.