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
ä | |
<%= @str %> |
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
instance_eval <<_E | |
puts "\xe3\x81\x82".encoding # => ASCII-8BIT | |
_E | |
instance_eval <<_E | |
# coding: utf-8 | |
puts "\xe3\x81\x82".encoding # => UTF-8 | |
_E |
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
# create table users (id integer auto_increment, primary key (id)); | |
# create table items (id integer auto_increment, user_id integer, primary key (id)); | |
# insert into users (id) values (1); | |
# insert into items (user_id) values (1); | |
% cat a.rb | |
require 'rubygems' | |
require 'active_support/dependencies' | |
require 'active_record' |
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
module ActiveRecord::ConnectionAdapters::SchemaStatements | |
alias orig_add_index add_index | |
def add_index(table_name, column_name, options = {}) | |
orig_add_index(table_name, column_name, options || {}) | |
end | |
end |
NewerOlder