Todos los requests deben ser realizandos enviando API_KEY via GET
GET /schools
class CommunicationSearch < Search | |
attr_accessor :full_name | |
def results(base = nil) | |
if self.full_name.present? | |
contacts = PadmaContact.paginate :where => { :full_name => self.full_name }, :per_page => 999999 | |
base = base.where(:contact_id => contacts.map(&:id)) | |
end | |
... | |
base |
class Search | |
include Mongoid::Document | |
field :query, :type => Hash | |
field :collection | |
embedded_in :user | |
def to_criteria | |
Mongoid::Criteria.new( collection.titleize.constantize ).fuse( query ) |
# In CONTACTS WS | |
# V0::ContactsController | |
# POST create | |
# if it recieves image | |
# should store it on amazon and link it to contact | |
# PUT update | |
# if it recieves image | |
# should store it on amazon and link it to contact | |
# should delete previous image | |
# DELETE destroy |
# pero agregué este spec en contacts y pasa | |
# así que debe ser algo de como CRm esta creando el contact,no? | |
it "should allow access to contacts" do | |
l = List.make | |
a = l.account | |
c = Contact.make(:lists => [l]) | |
l.reload | |
l.contacts.should == [c] | |
a.lists.first.contacts.should == [c] | |
end |
.idea/ |
heroku create $1 | |
heroku addons:add pgbackups:auto-month | |
heroku addons:add custom_domains:basic | |
heroku addons:add zerigo_dns:basic | |
heroku addons:add newrelic:standard | |
heroku addons:upgrade logging:expanded |
c_cyan=`tput setaf 6` | |
c_red=`tput setaf 1` | |
c_green=`tput setaf 2` | |
c_sgr0=`tput sgr0` | |
parse_git_branch () | |
{ | |
if git rev-parse --git-dir >/dev/null 2>&1 | |
then | |
gitver=$(git branch 2>/dev/null| sed -n '/^\*/s/^\* //p') |
# ~/.bashrc: executed by bash(1) for non-login shells. | |
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) | |
# for examples | |
# If not running interactively, don't do anything | |
if [[ -n "$PS1" ]]; then | |
# don't put duplicate lines in the history. See bash(1) for more options | |
# ... or force ignoredups and ignorespace | |
HISTCONTROL=ignoredups:ignorespace |