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
# https://www.youtube.com/watch?v=uTR__8RvgvM | |
# ---------------------------------------------------------------------------- # | |
Project = Struct.new(:creator) | |
Person = Struct.new(:address) | |
Address = Struct.new(:country) | |
Country = Struct.new(:capital) | |
City = Struct.new(:weather) | |
class Optional |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="http://code.jquery.com/jquery-2.1.1.min.js"></script> | |
<meta charset="utf-8"> | |
<title>JS Bin</title> | |
<style id="jsbin-css"> | |
ul, ol, li { | |
list-style: none; | |
margin: 0; |
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
has_permission_on :field_values, :to => [:create, :destroy, :delete, :update] do | |
if_attribute :submission => { :company => is { user.company } } | |
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
namespace :yourapp do | |
desc "Precompiles assets" | |
task :precompile_assets do | |
ENV["RAILS_GROUPS"] = ENV['RAILS_ENV'] = 'development' | |
Rake::Task["environment"].invoke | |
YourApp::Application.configure do | |
config.assets.debug = false | |
config.assets.compress = true | |
config.assets.compile = true |
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
# see: http://jonathanleighton.com/articles/2011/awesome-active-record-bug-reports/ | |
require 'test/unit' | |
require 'ruby-debug' | |
require 'active_record' | |
puts "Active Record #{ActiveRecord::VERSION::STRING}" | |
ActiveRecord::Base.establish_connection( | |
:adapter => 'sqlite3', | |
:database => ':memory:' |
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
module ActiveRecord | |
module ConnectionAdapters | |
class AbstractAdapter | |
protected | |
# Rails 3.1 | |
def log_with_trace(sql, name = "SQL", binds = [], &block) | |
if @logger && @logger.debug? | |
c = caller.detect{|line| line !~ /(activerecord|active_support|__DELEGATION__|\/lib\/|\/vendor\/plugins|\/vendor\/gems)/i} | |
c ||= caller.first |
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
activerecord (3.2.1) lib/active_record/attribute_methods.rb:41:in `define_attribute_methods' | |
activerecord (3.2.1) lib/active_record/attribute_methods.rb:145:in `respond_to?' | |
activesupport (3.2.1) lib/active_support/callbacks.rb:398:in `__run_callback' | |
activesupport (3.2.1) lib/active_support/callbacks.rb:385:in `_run_find_callbacks' | |
activesupport (3.2.1) lib/active_support/callbacks.rb:81:in `run_callbacks' | |
activerecord (3.2.1) lib/active_record/base.rb:520:in `init_with' | |
activerecord (3.2.1) lib/active_record/inheritance.rb:76:in `instantiate' | |
activerecord (3.2.1) lib/active_record/querying.rb:38:in `block (2 levels) in find_by_sql' | |
activerecord (3.2.1) lib/active_record/querying.rb:38:in `collect!' | |
activerecord (3.2.1) lib/active_record/querying.rb:38:in `block in find_by_sql' |
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
GEM | |
remote: http://rubygems.org/ | |
specs: | |
actionmailer (3.2.1) | |
actionpack (= 3.2.1) | |
mail (~> 2.4.0) | |
actionpack (3.2.1) | |
activemodel (= 3.2.1) | |
activesupport (= 3.2.1) | |
builder (~> 3.0.0) |
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
GEM | |
remote: http://rubygems.org/ | |
specs: | |
actionmailer (3.2.1) | |
actionpack (= 3.2.1) | |
mail (~> 2.4.0) | |
actionpack (3.2.1) | |
activemodel (= 3.2.1) | |
activesupport (= 3.2.1) | |
builder (~> 3.0.0) |
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
==> Downloading http://ftp.gnome.org/pub/GNOME/sources/pango/1.28/pango-1.28.4.tar.bz2 | |
File already downloaded in /Users/milovanzogovic/Library/Caches/Homebrew | |
/usr/bin/tar xf /Users/milovanzogovic/Library/Caches/Homebrew/pango-1.28.4.tar.bz2 | |
==> Downloading patches | |
/usr/bin/curl -qf#LA Homebrew 0.8.1 (Ruby 1.8.7-249; Mac OS X 10.7.3) https://trac.macports.org/export/89719/trunk/dports/x11/pango/files/patch-G_CONST_RETURN.diff -o 001-homebrew.diff --silent | |
==> Patching | |
/usr/bin/patch -f -p0 -i 001-homebrew.diff | |
patching file modules/hebrew/hebrew-shaper.c | |
patching file pango/fonts.c | |
patching file pango/pango-attributes.c |
OlderNewer