I'm working with rails 2.3.5 application, in witch I have this field t.string "trip_cities", :limit => 256 And this index add_index "bookings", ["trip_cities"], :name => "trip_cities" When I try to execute: bundle exec rake db:test:load I receive this error Mysql::Error: Specified key was too long; max key length is 767 bytes: CREATE INDEX 'trip_cities' ON 'bookings' ('trip_cities') and don't quit
I'm testing a model with an after create callback that I'd like to run only on some occasions while testing. How can I skip/run callbacks from a factory? class User < ActiveRecord::Base after_create :run_something ... end Factory: FactoryGirl.define do factory :user do first_name "Luiz" last_name "Branco" ... # skip callback factory :with_run_something do # run callback end end
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く