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 Example < ActiveRecord::Base | |
| require 'rubygems' | |
| require 'nokogiri' | |
| require 'open-uri' | |
| include Splitter | |
| belongs_to :word, :counter_cache => true | |
| belongs_to :sentence, :dependent => :destroy | 
  
    
      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 Embed::EmbedController < ApplicationController | |
| skip_before_filter :save_referer | |
| layout "embed" | |
| protected | |
| def embedded_list | |
| @list = List.find(params[:list_id] ||= params[:id]) | |
| if !@list.public | |
| raise "Unable to view this list".inspect unless @list.academic_class_id | 
  
    
      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 UpdateBlankAsiAndRfiSummaries < ActiveRecord::Migration | |
| def up | |
| ArchitecturalSupplementalInformation.where(:summary => ['',' ']).each do |asi| | |
| asi.skip_notifications = true | |
| asi.summary = '--' | |
| asi.save | |
| end | |
| RequestForInformation.where(:summary => ['',' ']).each do |rfi| | |
| rfi.skip_notifications = true | |
| rfi.summary = '--' | 
  
    
      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 search | |
| query = params[:query].strip | |
| results = ActiveRecord::Base.connection.select_all("SELECT c.name, addresses.state, addresses.city, scope_of_work_types.label AS tags | |
| FROM companies c | |
| LEFT JOIN addresses on c.id = addresses.owner_id | |
| LEFT JOIN scope_of_work_types on c.id = scope_of_work_types.taggee_id | |
| WHERE c.name ILIKE '%#{query}%' or addresses.city ILIKE '%#{query}%' or | |
| (scope_of_work_types.label ILIKE '%#{query}%' and scope_of_work_types.tagger_id = #{current_company.id})") #private tags | |
| to_extjs(results) | |
| 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
    
  
  
    
  | def search | |
| query = params[:query].strip | |
| results = ActiveRecord::Base.connection.select_all("SELECT c.name, addresses.state, addresses.city, scope_of_work_types.label AS tags | |
| FROM companies c | |
| LEFT JOIN addresses on c.id = addresses.owner_id | |
| LEFT JOIN scope_of_work_types on c.id = scope_of_work_types.taggee_id | |
| WHERE c.name ILIKE '%#{query}%' or addresses.city ILIKE '%#{query}%' or | |
| (scope_of_work_types.label ILIKE '%#{query}%' and scope_of_work_types.tagger_id = #{current_company.id})") #private tags | |
| to_extjs(results) | |
| 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
    
  
  
    
  | def search | |
| query = params[:query].strip | |
| results = ActiveRecord::Base.connection.select_all("SELECT c.name, addresses.state, addresses.city, scope_of_work_types.label AS private_tag | |
| FROM companies c | |
| LEFT JOIN addresses on c.id = addresses.owner_id | |
| LEFT JOIN scope_of_work_types on c.id = scope_of_work_types.taggee_id | |
| WHERE c.name ILIKE '%#{query}%' or addresses.city ILIKE '%#{query}%' or | |
| (scope_of_work_types.label ILIKE '%#{query}%' and scope_of_work_types.tagger_id = #{current_company.id})") #private tag | |
| to_extjs(results) | |
| 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
    
  
  
    
  | def search | |
| query = params[:query].strip | |
| results = ActiveRecord::Base.connection.select_all("SELECT c.name, addresses.state, addresses.city, scope_of_work_types.label AS private_tags | |
| FROM companies c | |
| LEFT JOIN addresses on c.id = addresses.owner_id | |
| LEFT JOIN scope_of_work_types on c.id = scope_of_work_types.taggee_id | |
| WHERE c.name ILIKE '%#{query}%' or addresses.city ILIKE '%#{query}%' or | |
| (scope_of_work_types.label ILIKE '%#{query}%' and scope_of_work_types.tagger_id = #{current_company.id})") #private tag | |
| to_extjs(results) | |
| 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
    
  
  
    
  | ActiveRecord::Base.connection.select_all("SELECT c.name, tags.label AS private_tag FROM companies c LEFT JOIN tags on c.id = (scope_of_work_types.label ILIKE '%always%' and tags.tagger_id = 117)") | 
  
    
      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
    
  
  
    
  | Here's the JSON that gets returned for each of the 3 Mancount Entry POST requests: | |
| {"success":true,"code":200,"data":{"contractor_id":390,"created_at":"2013-03-08T18:43:40Z","created_by_id":null,"daily_report_id":9413,"hours_worked":"0.0","id":176,"overtime_hours_worked":"0.0","overtime_worker_count":0,"photos_count":null,"project_id":39,"total_hours_worked":0.0,"updated_at":"2013-03-08T18:43:40Z","worker_count":0,"worker_type":"Foreman"},"error":""} | |
| {"success":true,"code":200,"data":{"contractor_id":202,"created_at":"2013-03-08T18:43:55Z","created_by_id":null,"daily_report_id":9413,"hours_worked":"0.0","id":177,"overtime_hours_worked":"0.0","overtime_worker_count":0,"photos_count":null,"project_id":39,"total_hours_worked":0.0,"updated_at":"2013-03-08T18:43:55Z","worker_count":0,"worker_type":"Journeyman"},"error":""} | |
| {"success":true,"code":200,"data":{"contractor_id":203,"created_at":"2013-03-08T18:44:06Z","created_by_id":null,"daily_report_id":9413,"hours_worked":"0.0","id":178,"overtime_hours_worked":"0.0" | 
  
    
      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
    
  
  
    
  | Here's the JSON that gets returned for each of the 3 Mancount Entry POST requests: | |
| {"success":true,"code":200,"data":{"contractor_id":390,"created_at":"2013-03-08T18:43:40Z","created_by_id":null,"daily_report_id":9413,"hours_worked":"0.0","id":176,"overtime_hours_worked":"0.0","overtime_worker_count":0,"photos_count":null,"project_id":39,"total_hours_worked":0.0,"updated_at":"2013-03-08T18:43:40Z","worker_count":0,"worker_type":"Foreman"},"error":""} | |
| {"success":true,"code":200,"data":{"contractor_id":202,"created_at":"2013-03-08T18:43:55Z","created_by_id":null,"daily_report_id":9413,"hours_worked":"0.0","id":177,"overtime_hours_worked":"0.0","overtime_worker_count":0,"photos_count":null,"project_id":39,"total_hours_worked":0.0,"updated_at":"2013-03-08T18:43:55Z","worker_count":0,"worker_type":"Journeyman"},"error":""} | |
| {"success":true,"code":200,"data":{"contractor_id":203,"created_at":"2013-03-08T18:44:06Z","created_by_id":null,"daily_report_id":9413,"hours_worked":"0.0","id":178,"overtime_hours_worked":"0.0" | 
OlderNewer