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
| validate :custom_validation_method | |
| def custom_validation_method | |
| if parent_object.has_stuff? && name.blank? | |
| errors.add :name, 'should not be blank when parent object has stuff' | |
| end | |
| 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
| desc "Migrate all of the databases" | |
| task :migrate_all => :environment do | |
| Customer.connect_each do |customer| | |
| puts "Migrating #{customer.environment}" | |
| ActiveRecord::Migrator.migrate "db/migrate/" | |
| end | |
| 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
| config/database.yml | |
| db/schema.rb | |
| db/*.sqlite3 | |
| doc/app | |
| doc/diagrams | |
| log/*.log | |
| tmp/* |
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
| #!/usr/bin/ruby -w | |
| =begin | |
| /*************************************************************************** | |
| * Copyright (C) 2008, Paul Lutus * | |
| * * | |
| * This program is free software; you can redistribute it and/or modify * | |
| * it under the terms of the GNU General Public License as published by * | |
| * the Free Software Foundation; either version 2 of the License, or * |
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
| http://localhost:4567/b71e6394-cb6a-4bf3-859f-d8b11fc86764/api |
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
| begin | |
| require 'hanna/rdoctask' | |
| rescue LoadError | |
| require 'rake/rdoctask' | |
| 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
| function getElementXPath(elt) | |
| { | |
| var path = ""; | |
| for (; elt && elt.nodeType == 1; elt = elt.parentNode) | |
| { | |
| idx = getElementIdx(elt); | |
| xname = elt.tagName; | |
| if (idx > 1) xname += "[" + idx + "]"; | |
| path = "/" + xname + path; | |
| } |
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
| function getElementXPath(elt) | |
| { | |
| var path = ""; | |
| for (; elt && elt.nodeType == 1; elt = elt.parentNode) | |
| { | |
| idx = getElementIdx(elt); | |
| xname = elt.tagName; | |
| if (idx > 1) xname += "[" + idx + "]"; | |
| path = "/" + xname + path; | |
| } |
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
| * keep people working on internal projects, assign and schedule the work | |
| * dont look desperate, dont have immediate availability | |
| * can tell a client you can 'shuffle internal projects' to accomodate them | |
| * online ads dont work well | |
| * referrals instead | |
| * do a great job every single time | |
| * voice calls important | |
| * when people call you call them back |
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
| desc "List the gems that this rails application depends on" | |
| task :gems => 'gems:base' do | |
| Rails.configuration.gems.each do |gem| | |
| print_gem_status(gem) | |
| end | |
| puts | |
| puts "I = Installed" | |
| puts "F = Frozen" | |
| puts "R = Framework (loaded before rails starts)" | |
| end |