プロジェクト

全般

プロフィール

« | » 

リビジョン b1b7d669

高徹 高橋 徹 さんが約6年前に追加

[phase-7]add sidebar with some links, index link and search

差分を表示:

app/models/glossary_term.rb
class GlossaryTerm < ActiveRecord::Base
belongs_to :category, class_name: 'GlossaryCategory', foreign_key: 'category_id'
belongs_to :project
scope :search_by_name, -> (keyword) {
where 'name like ?', "#{sanitize_sql_like(keyword)}%"
}
end

他の形式にエクスポート: Unified diff