プロジェクト

全般

プロフィール

« | » 

リビジョン 4c7956ff

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

[bugfix]before calling authorize, should call find_project

差分を表示:

app/controllers/glossary_terms_controller.rb
class GlossaryTermsController < ApplicationController
before_action :authorize
before_action :find_term_from_id, only: [:show, :edit, :update, :destroy]
before_action :find_project_from_id
before_action :find_project_from_id, :authorize
def index
@glossary_terms = GlossaryTerm.where(project_id: @project.id)
@glossary_terms = @glossary_terms.search_by_name(params[:index]) unless params[:index].nil?

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