0
Twitter寶石無法呈現鳴叫中的鏈接。我如何呈現twitter鏈接以查看?例如鏈接@user或連結#tagTwitter寶石無法呈現鳴叫中的鏈接
查看:
<% @tweet_news.each do |tweet| %>
<li><em><%= l tweet.created_at %></em>
<p><%= raw linkify(tweet.text) %></p>
<li>
<% end %>
控制器:
def news
account = Settings['twitter'][Locale.get.to_s]
Twitter.configure do |config|
config.consumer_key = account['consumer_key']
config.consumer_secret = account['consumer_secret']
config.oauth_token = account['oauth_token']
config.oauth_token_secret = account['oauth_token_secret']
end
@twitter_user = account['name']
@tweet_news = Twitter.user_timeline(@twitter_user, {count: 3})
render 'blocks/news', layout: false