0

I try to use embedly in my rails 3.2 application. I register on embed.ly and have my key that I put in my application.js like this :

$.embedly.defaults.key = 'mykeycodexxxxxxxxxxxxx';

I have a field @mean.link that I would like to embed I look about embedly-ruby and embedly-jquery but I was not able to add nothing working. Perhaps because I'm not familiar with jquery or javascript and only with rails ?

Sorry for the very newbie's question

4

1 回答 1

0

只需添加gem 'embedly'并运行捆绑安装。然后require 'embedly'在您的控制器和初始化程序/application.rb 中设置,然后在您的视图中添加密钥,例如

<%embedly_api = Embedly::API.new :key => 'xxxxxxxxxxxxxxxxxxxxxxxxxx'%>
<%=obj[0].marshal_dump %>

并且需要'rails/all'需要'embedly'需要'json'来配置/application.rb你也可以按照https: //github.com/embedly/embedly-ruby...享受编码。

于 2014-06-21T16:12:47.107 回答