Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class SolucionesController < ApplicationController
- include Databasedotcom::Rails::Controller
- @sols
- @masvisitadas
- def index
- config = YAML.load_file(File.join(::Rails.root, 'config', 'databasedotcom.yml'))
- client = Databasedotcom::Client.new(config)
- client.authenticate :username => config[:username], :password => config[:password]
- @sols = client.query("select id, SolutionName, NumeroVisitas__c from Solution where RecordTypeId='012D0000000BBCQ'")
- @masvisitadas= @sols.sort_by{|s| -s.NumeroVisitas__c}
- end
- def despliega
- respond_to do |format|
- format.js {}
- end
- end
- end
Add Comment
Please, Sign In to add comment