0
레일에 문제가 있습니다 : notice in rails 3.2.1. 여기에 내 코드rails 3.2.1 플래시 메시지를 표시 할 수 없습니다.
내 주요 레이아웃class AssetsController < ApplicationController
before_filter :authenticate_user!
before_filter :user_can_upload, :only => [:new, :add_image]
#...actions
def new
@asset = Asset.new
respond_to do |format|
format.html # new.html.erb
format.json { render json: @asset }
end
end
private
def user_can_upload
if current_user.can_upload?
redirect_to dashboard_index_path, notice: I18n.t(:quota_assets)
end
end
end
내가 예를 들어
%body
= render 'layouts/shared/header'
-if notice
.container
.alert.alert-success=raw notice
= yield
가지고, 새로운 액션 리디렉션에서 잘 작동하지만 통지 메시지가 표시되지 않습니다. 힌트가 있습니까? 고맙습니다.