[英]How to implement badgeville in ruby on rails
Can anyone tell me how to implement badgeville
in ruby on rails? 谁能告诉我如何在红宝石中实现
badgeville
?
EDIT: how can I apply this on ruby on rails? 编辑:如何将其应用在轨道上的红宝石上?
https://github.com/badgeville/badgeville-ruby https://github.com/badgeville/badgeville-ruby
I'm not sure how this particular gem work, but normally it should work with following steps 我不确定这个特殊的宝石如何工作,但是通常它应该按照以下步骤工作
add the following code to badgeville.rb 将以下代码添加到badgeville.rb
BadgevilleBerlin::Config.conf( :host_name => " http://example.com ", :api_key => MY_API_KEY) BadgevilleBerlin :: Config.conf(:host_name =>“ http://example.com ”,:api_key => MY_API_KEY)
restart 重新开始
then you should be able to use the following commands inside your controllers/ models 那么您应该能够在控制器/模型中使用以下命令
Ex: 例如:
new_site = BadgevilleBerlin::Site.new( :name => "My Website", :url => "mydomain.com", :network_id => MY_NETWORK_ID ) success = new_site.save new_site = BadgevilleBerlin :: Site.new(:name =>“我的网站”,:url =>“ mydomain.com”,:network_id => MY_NETWORK_ID)成功= new_site.save
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.