This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@placed_calls = current_user.call_logs.find(:all, :conditions => ['client_id = ?', current_user.id]) | |
@placed_calls_count = Hash.new(0) | |
@placed_calls.collect { |e| e.vendor }.flatten | |
@placed_calls.each { |e| @placed_calls_count[e.vendor] += 1} | |
@placed_calls_count.sort {|a, b| a <=> b} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@placed_calls = current_user.call_logs.find(:all, :conditions => ['client_id = ?', current_user.id]) | |
@placed_calls_vendor_count = Hash.new(0) | |
@placed_calls.each { |e| @placed_calls_vendor_count[e.vendor] += 1} | |
@placed_calls_vendor_count.sort {|a, b| a <=> b} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="xrounded"> | |
<b class="xtop"><b class="xb1"></b><b class="xb2"></b><b class="xb3"></b><b class="xb4"></b></b> | |
<div class="xboxcontent"> | |
Content | |
</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- rounded_box do | |
%p | |
%span.hentry.yui-gf{"class"=>"#{user.vendor ? 'community_pro' : ''} #{user.featured_writer ? 'featured_writer' : ''}"} | |
.vcard.author | |
.yui-u.first.centered | |
= link_to image_tag( user.avatar_photo_url(:thumb), :class => "polaroid" ), user_path(user) | |
.yui-g | |
.yui-u.first | |
%h2= link_to user.login, user_path(user) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%script | |
:plain | |
document.observe('dom:loaded', function() { | |
$$('a[rel]').each(function(element) { | |
new Tip(element, { ajax: {url: element.rel, options: {method: 'get'}} }); | |
}); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%script | |
:plain | |
document.observe('dom:loaded', function() { | |
$$('.user').each(function(element) { | |
new Tip(element, { ajax: {url: element.select('a[rel]').rel, options: {method: 'get'}} }); | |
}); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def find_call_session | |
CallSession.find(:first, :conditions => ["client_id = ? OR vendor_id = ?", id, id]) | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Migration: | |
class CreateOutboundRates < ActiveRecord::Migration | |
def self.up | |
create_table :outbound_rates do |t| | |
t.string :destination | |
t.integer :prefix | |
t.integer :rate_in_cents | |
t.timestamps | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ChatController < ApplicationController | |
def authorize | |
xml = Builder::XmlMarkup.new(:indent => 2) | |
xml.instruct! | |
xml.auth do | |
xml.userName | |
xml.gender | |
xml.level | |
xml.photo | |
xml.photoModeImage |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ChatController < ApplicationController | |
def authorize | |
generated_xml = String.new | |
xml = Builder::XmlMarkup.new(:target => generated_xml, :indent => 2) | |
xml.instruct! | |
xml.auth do | |
xml.userName | |
xml.gender | |
xml.level | |
xml.photo |