view_translation.rb

来自「A Hotel Management System based on Ruby 」· RB 代码 · 共 15 行

RB
15
字号
module Globalize
  # Represents a view translation in the DB, which is a translation of a string
  # in the rails application itself. This includes error messages, controllers,
  # views, and flashes, but not database content.
  class ViewTranslation < Translation # :nodoc:

    def self.pick(key, language, idx)
      find(:first, :conditions => [ 
        'tr_key = ? AND language_id = ? AND pluralization_index = ?', 
        key, language.id, idx ])
    end

  end
end

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?