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
#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メールアドレスが見つかった場合、本人確認についてのメールが数分以内に送られます。' |
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
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) |
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::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` |
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
<!--[if IE]><script> | |
\ ¦ / | |
\ ¦ / | |
/ ̄ ̄ ヽ, | |
/ ', / _/\/\/\/|_ | |
\ ノ//, {☎} /¨`ヽ {☎} ,ミヽ / \ / | |
\ / く l ヽ._.ノ ', ゝ \ < IE 死 > | |
/ /⌒ リ `ー'′ ' ⌒\ \ / \ | |
(  ̄ ̄⌒ ⌒ ̄ _)  ̄|/\/\/\/ ̄ | |
` ̄ ̄`ヽ /´ ̄ |