class CurrencyInput < SimpleForm::Inputs::Base
def input
input_html_classes.unshift("string currency")
input_html_options[:type] ||= input_type if html5?
template.content_tag(:span, "$", class: "add-on") +
@builder.text_field(attribute_name, input_html_options)
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
require 'active_support' | |
class Foo | |
def foo | |
"foo" | |
end | |
def bar | |
ActiveSupport::Deprecation.warn("bar is deprecated") |
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
unless File.exist?('Gemfile') | |
File.write('Gemfile', <<-GEMFILE) | |
source 'https://rubygems.org' | |
gem 'rails', github: 'rails/rails' | |
gem 'arel', github: 'rails/arel' | |
gem 'sqlite3' | |
GEMFILE | |
system 'bundle' | |
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
-- create_table(:users) | |
D, [2014-01-30T22:08:17.324202 #81447] DEBUG -- : (0.4ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255)) | |
-> 0.0057s | |
Run options: --seed 58805 | |
# Running tests: | |
D, [2014-01-30T22:08:17.647532 #81447] DEBUG -- : (0.1ms) begin transaction | |
D, [2014-01-30T22:08:17.682862 #81447] DEBUG -- : SQL (0.3ms) INSERT INTO "users" ("name") VALUES (?) [["name", "Rafael"]] | |
D, [2014-01-30T22:08:17.683633 #81447] DEBUG -- : (0.2ms) commit transaction |
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
-- create_table(:users) | |
D, [2014-01-30T22:10:52.725995 #81566] DEBUG -- : (0.4ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255)) | |
-> 0.0054s | |
Run options: --seed 18199 | |
# Running: | |
D, [2014-01-30T22:10:52.750686 #81566] DEBUG -- : (0.1ms) begin transaction | |
D, [2014-01-30T22:10:52.753069 #81566] DEBUG -- : SQL (0.1ms) INSERT INTO "users" ("name") VALUES (?) [["name", "Rafael"]] | |
D, [2014-01-30T22:10:52.753319 #81566] DEBUG -- : (0.0ms) commit transaction |
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
diff --git a/lib/arel.rb b/lib/arel.rb | |
index a2a3588..70b46fc 100644 | |
--- a/lib/arel.rb | |
+++ b/lib/arel.rb | |
@@ -11,10 +11,6 @@ require 'arel/table' | |
require 'arel/attributes' | |
require 'arel/compatibility/wheres' | |
-#### these are deprecated | |
-require 'arel/expression' |
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
#!/usr/bin/env ruby | |
require 'bundler' | |
Bundler.setup | |
require 'octokit' | |
require 'active_support' | |
require 'active_support/core_ext/date/calculations' | |
require 'active_support/core_ext/numeric/time' | |
REPOSITORIES = %w(spree/spree) |
I hereby claim:
- I am rafaelfranca on github.
- I am rafaelfranca (https://keybase.io/rafaelfranca) on keybase.
- I have a public key whose fingerprint is 54FE 550E A35E 26D7 C753 62C1 FC23 B6D0 F1EE E948
To claim this, I am signing this object:
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
diff --git a/activerecord/lib/active_record/fixtures.rb b/activerecord/lib/active_record/fixtures.rb | |
index 4cd5f92..4306b36 100644 | |
--- a/activerecord/lib/active_record/fixtures.rb | |
+++ b/activerecord/lib/active_record/fixtures.rb | |
@@ -2,7 +2,7 @@ require 'erb' | |
require 'yaml' | |
require 'zlib' | |
require 'active_support/dependencies' | |
-require 'active_support/core_ext/securerandom' | |
+require 'active_support/core_ext/digest/uuid' |
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
# test/template/benchmark/render_erb_test.rb | |
# encoding: utf-8 | |
require 'abstract_unit' | |
require 'controller/fake_models' | |
require 'benchmark/ips' | |
class TestController < ActionController::Base | |
end | |
class RenderErbBenchmarks < ActiveSupport::TestCase |
OlderNewer