Skip to content

Instantly share code, notes, and snippets.

View tatat's full-sized avatar
๐Ÿ’ญ
๐Ÿฆ‰

ใŸใจ tatat

๐Ÿ’ญ
๐Ÿฆ‰
View GitHub Profile
@tatat
tatat / devise.ja.yml
Last active August 29, 2015 13:57 — forked from kawamoto/devise.ja.yml
ใจใ‚ใ‚‹ๆกˆไปถ็”จใซใ‚ซใ‚นใ‚ฟใƒžใ‚คใ‚บใ•ใ›ใฆใ„ใŸใ ใใพใ—ใŸใ‚„ใค
#SOURCE https://gist.github.com/tatat/9526513
ja:
devise:
confirmations:
confirmed: 'ใ‚ขใ‚ซใ‚ฆใƒณใƒˆใ‚’็™ป้Œฒใ—ใพใ—ใŸใ€‚'
# confirmed: 'Your account was successfully confirmed. You are now signed in.'
send_instructions: '็™ป้Œฒๆ–นๆณ•ใ‚’ๆ•ฐๅˆ†ไปฅๅ†…ใซใƒกใƒผใƒซใงใ”้€ฃ็ตกใ—ใพใ™ใ€‚'
# send_instructions: 'You will receive an email with instructions about how to confirm your account in a few minutes.'
send_paranoid_instructions: 'ใ‚‚ใ—ใ‚ใชใŸใฎEใƒกใƒผใƒซใ‚ขใƒ‰ใƒฌใ‚นใŒ่ฆ‹ใคใ‹ใฃใŸๅ ดๅˆใ€ๆœฌไบบ็ขบ่ชใซใคใ„ใฆใฎใƒกใƒผใƒซใŒๆ•ฐๅˆ†ไปฅๅ†…ใซ้€ใ‚‰ใ‚Œใพใ™ใ€‚'
class Nyan
def behave_method(target, source)
(class << self; self end).module_exec do
alias_method "#{target}_original", target unless method_defined? "#{target}_original"
alias_method "#{source}_original", source unless method_defined? "#{source}_original"
alias_method target, "#{source}_original"
end
end
def with_behaving_method(a, b)
ActiveRecord::Base.connection.tables.each do |table_name|
next if %w|SchemaMigration Session|.include? table_name.classify
code = <<EOS
class #{table_name.classify} < ActiveRecord::Base
attr_accessible :#{table_name.classify.constantize.column_names.join(', :')}
end
EOS
`echo '#{code}' > app/models/#{table_name.singularize}.rb`
<!--[if IE]><script>
๏ผผใ€€ใ€€ ใ€€ใ€€ใ€€ใ€€ ใ€€ใ€€ใ€€ใ€€ใ€€ใ€€ใ€€๏ฟคใ€€ใ€€ใ€€ใ€€ใ€€ใ€€ ใ€€ /
ใ€€ ๏ผผใ€€ใ€€ใ€€ใ€€ใ€€ ใ€€ใ€€ใ€€ใ€€ใ€€ใ€€ใ€€๏ฟคใ€€ใ€€ใ€€ใ€€ใ€€ ใ€€ /
ใ€€ใ€€ใ€€ใ€€ใ€€ใ€€ใ€€ใ€€ใ€€ใ€€ใ€€ใ€€ใ€€๏ผ๏ฟฃ๏ฟฃใ€€ใƒฝ,
ใ€€ใ€€ใ€€ใ€€ใ€€ใ€€ใ€€ใ€€ใ€€ใ€€ใ€€ใ€€/ใ€€ใ€€ใ€€ใ€€ใ€€ ใ€€ ',ใ€€ใ€€ใ€€ใ€€ใ€€ใ€€/ใ€€ใ€€ ใ€€ใ€€๏ผฟ/๏ผผ๏ผ๏ผผ/๏ผผ๏ผ|๏ผฟ
ใ€€ใ€€ใ€€ ๏ผผใ€€ใ€€ใ€€ ๏พ‰//, {โ˜Ž}ใ€€ /ยจ`ใƒฝใ€€{โ˜Ž}ใ€€,๏พใƒฝใ€€ ใ€€ /ใ€€ ใ€€ใ€€ ๏ผผใ€€ใ€€ ใ€€ใ€€ใ€€ใ€€ใ€€ใ€€ใ€€๏ผ
ใ€€ใ€€ใ€€ใ€€ใ€€๏ผผ ๏ผใ€€ใใ€€๏ฝŒใ€€ใ€€ ใƒฝ._.ใƒŽใ€€ใ€€ใ€€', ใ‚ใ€€๏ผผใ€€ใ€€ใ€€ ใ€€ใ€€ ๏ผœใ€€ใ€€ IE ๆญปใ€€ใ€€๏ผž
ใ€€ใ€€ใ€€ใ€€ใ€€๏ผ ๏ผโŒ’ใ€€๏พ˜ใ€€ใ€€ใ€€๏ฝ€ใƒผ'โ€ฒใ€€ใ€€ ' โŒ’๏ผผ ๏ผผใ€€ใ€€ใ€€ใ€€๏ผใ€€ ใ€€ใ€€ใ€€ใ€€ใ€€ใ€€ใ€€ใ€€๏ผผ
ใ€€ใ€€ใ€€ใ€€ใ€€(ใ€€ใ€€๏ฟฃ๏ฟฃโŒ’ใ€€ใ€€ใ€€ใ€€ใ€€ใ€€ใ€€ใ€€ใ€€ใ€€โŒ’๏ฟฃใ€€๏ผฟ)ใ€€ใ€€ใ€€๏ฟฃ|๏ผ๏ผผ/๏ผผ/๏ผผ/๏ฟฃ
ใ€€ใ€€ใ€€ใ€€ใ€€ใ€€๏ฝ€๏ฟฃ๏ฟฃ๏ฝ€ใƒฝใ€€ใ€€ใ€€ใ€€ใ€€ใ€€ใ€€ใ€€ใ€€ใ€€ใ€€/ยด๏ฟฃ