I think you would like to do something like:
@symbols = @post.tag_list @quotes = StockQuote::Stock.quote(@symbols)
Since a message can really be marked with several characters, you will want to immediately extract them, and then iterate over the result in the view. Sort of:
<% @quotes.each do |quote| %> <%= "#{quote.symbol}: #{quote.ask}" %> <% end %>
I am not very familiar with gems, but with a quick glance it seems something like this will work.
In addition, you formulate the question as if you had a special instance of the message, but then show the action of the index, which pulls out a collection of messages. The example I provided will work for a unique Mail (the user is viewing the message page).
source share