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
# Returns model class used by parent side of the relationship | |
# | |
# @return [Resource] | |
# Class of association parent | |
# | |
# @api private | |
def parent_model | |
@parent_model ||= (@child_model || Object).find_const(parent_model_name) | |
rescue NameError | |
raise NameError, "Cannot find the parent_model #{parent_model_name} for #{child_model_name} in #{name}" |
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
DataMapper::Logger.new(STDOUT, :debug) | |
require 'rails_datamapper' |
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
Zombie: GET http://backbone-rails3.heroku.com/#addresses | |
Zombie: GET http://backbone-rails3.heroku.com/#addresses => 200 | |
Zombie: GET /assets/application.js?1294159060 | |
Zombie: GET /assets/application.js?1294159060 => 200 | |
Zombie: Running script from /assets/application.js | |
$ is not defined | |
Zombie: Running script from http://backbone-rails3.heroku.com/#addresses:undefined:undefined<script> | |
Zombie: Running script from http://backbone-rails3.heroku.com/#addresses:undefined:undefined<script> | |
The page: <!DOCTYPE html> | |
<html> |
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
require 'rubygems' | |
require 'oauth' | |
require 'oauth/consumer' | |
consumer_key = 'myusername' | |
consumer_secret ='mypassword' | |
consumer=OAuth::Consumer.new consumer_key, consumer_secret, {:site=>"http://twitter.com"} | |
request_token = consumer.get_request_token |
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 Property < ActiveRecord::Base | |
has_many :agents | |
searchable do | |
agents.each do |scoped_agent| | |
string "sort_agents_#{scoped_agent.id}" do | |
reordered_agents = agents.select { |agent| scoped_agent != agent } | |
reordered_agents << scoped_agent | |
reordered_agents.collect do |agent| |
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 attending_doctor_id | |
@patient_care_path.attending_doctor.id if @patient_care_path | |
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
{{#each field in fields}} | |
{{#each error in emberObject.field}} | |
{{/each}} | |
{{/each}} |
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
parsed_date = DateTime.strptime(primary_event_params[:scheduled_for], '%m/%d/%y') |
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
@messages = @messages | |
.joins(recommender: { care_team_member: :member }) | |
.where(member: { id: params[:recommender] }) |
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
max = 7 | |
count = 7 | |
active = 3 | |
inactive = 4 | |
Waiting on global queue: 25 | |
----------- Application groups ----------- | |
/data/behaving-app/current: | |
App root: /data/behaving-app/current | |
* PID: 5507 Sessions: 0 Processed: 137 Uptime: 1h 51m 32s |