Guest User

Untitled

a guest
Dec 2nd, 2018
180
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. class SolucionesController < ApplicationController
  2. include Databasedotcom::Rails::Controller
  3. @sols
  4. @masvisitadas
  5. def index
  6. config = YAML.load_file(File.join(::Rails.root, 'config', 'databasedotcom.yml'))
  7. client = Databasedotcom::Client.new(config)
  8. client.authenticate :username => config[:username], :password => config[:password]
  9. @sols = client.query("select id, SolutionName, NumeroVisitas__c from Solution where RecordTypeId='012D0000000BBCQ'")
  10. @masvisitadas= @sols.sort_by{|s| -s.NumeroVisitas__c}
  11. end
  12. def despliega
  13.  
  14. respond_to do |format|
  15. format.js {}
  16. end
  17. end
  18. end
Add Comment
Please, Sign In to add comment