This file contains 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
unknown column 'term.end_date' in 'where clause': SELECT `groups`.`id` AS t0_r0, `groups`.`course_id` AS t0_r1, `groups`.`term_id` AS t0_r2, `groups`.`created_at` AS t0_r3, `groups`.`updated_at` AS t0_r4, `terms`.`id` AS t1_r0, `terms`.`number` AS t1_r1, `terms`.`start_date` AS t1_r2, `terms`.`created_at` AS t1_r3, `terms`.`updated_at` AS t1_r4, `terms`.`end_date` AS t1_r5, `courses`.`id` AS t2_r0, `courses`.`course_type` AS t2_r1, `courses`.`course_name` AS t2_r2, `courses`.`date` AS t2_r3, `courses`.`created_at` AS t2_r4, `courses`.`updated_at` AS t2_r5, `courses`.`day` AS t2_r6, `courses`.`time` AS t2_r7 FROM `groups` LEFT OUTER JOIN `terms` ON `terms`.id = `groups`.term_id LEFT OUTER JOIN `groups` courses_terms_join ON (`terms`.`id` = `courses_terms_join`.`term_id`) LEFT OUTER JOIN `courses` ON (`courses`.`id` = `courses_terms_join`.`course_id`) WHERE (term.end_date >= '2010-06-29 00:00:00') |
This file contains 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
ActionController::Routing::Routes.draw do |map| | |
map.resources :users, :collection => {:login => :get, :logout => :get, :create => :get} | |
# The priority is based upon order of creation: first created -> highest priority. | |
map.resources :completed | |
map.resources :projects, :has_many => :presentations | |
map.resources :presentations, :has_one => :videos | |
map.resources :presentations, :has_one => :keynotes | |
map.resources :slides, :collection => { :times => :put} | |
# map.root :controller => "projects" |
This file contains 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 self.new_from lead | |
new do |contact| | |
contact.first_name = lead.first_name | |
contact.last_name = lead.last_name | |
contact.email = lead.email | |
contact.phone = lead.phone | |
contact.notes = lead.notes | |
contact.facebook = lead.facebook | |
contact.twitter = lead.twitter | |
contact.where = lead.where |
This file contains 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
SELECT candidates.*, histories.job_title, institutions.name FROM `candidates` | |
JOIN histories ON (histories.candidate_id = candidates.id AND histories.finish_date IS NULL) | |
JOIN institutions ON histories.institution_id = institutions.id | |
WHERE (candidates.id IN ('1','3','4','6') ) | |
ORDER BY institutions.name ASC, candidates.last_name ASC | |
CREATE TABLE `candidates` ( | |
`id` int(11) NOT NULL AUTO_INCREMENT, | |
`first_name` varchar(255) DEFAULT NULL, | |
`last_name` varchar(255) DEFAULT NULL, |
This file contains 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
--- !ruby/object:Page | |
attributes: | |
permalink: schedule | |
page_type: schedule | |
created_at: 2010-08-09 14:29:24 | |
event_id: "1" | |
updated_at: 2010-08-10 10:58:25 | |
id: "13" | |
content: "" | |
attributes_cache: {} |
This file contains 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
<?php | |
class PhotsShell extends Shell { | |
var $uses = array('AccommodationPhoto'); | |
function main() { | |
App::import('Core','Controller'); | |
App::import('Component','Uploader.Uploader'); | |
$this->Uploader =& new UploaderComponent; | |
$controller = null; | |
$this->Uploader->initialize($controller); |
This file contains 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
#Plan | |
class Plan < ActiveRecord::Base | |
attr_accessible :title, :price, :show_id | |
has_one :show | |
has_many :paths | |
has_many :topics, :through => :paths | |
accepts_nested_attributes_for :topics |
This file contains 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
Mysql::Error: Table 'af_development.shows' doesn't exist: SELECT `shows`.* FROM `shows` | |
models/af.rb | |
module Af | |
def self.table_name_prefix | |
'af_' | |
end | |
end |
This file contains 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
Routes | |
namespace :af do | |
resources :shows do | |
resources :presentations | |
end | |
resources :presentations do | |
resources :keynotes | |
resources :videos | |
end |
This file contains 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 class="field"> | |
<%= f.label :title %><br /> | |
<%= f.text_field :title %> | |
</div> | |
<div class="field"> | |
<%= f.label :speaker %><br /> | |
<%= f.text_field :speaker %> | |
</div> | |
<div class="field"> | |
<%= f.label :speaker_title %><br /> |
OlderNewer