简体   繁体   中英

How to implement badgeville in ruby on rails

Can anyone tell me how to implement badgeville in ruby on rails?

EDIT: how can I apply this on ruby on rails?

https://github.com/badgeville/badgeville-ruby

I'm not sure how this particular gem work, but normally it should work with following steps

  1. create a file called 'badgeville.rb' inside app/config/initializers
  2. add the following code to badgeville.rb

    BadgevilleBerlin::Config.conf( :host_name => " http://example.com ", :api_key => MY_API_KEY)

  3. restart

  4. 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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM