나는 내 tv_shows/index.html.erb 는 왜 : 레일에 3
<div id="notice"><%= notice %></div>
만에 다음 내 컨트롤러
def create
@tv_show = TvShow.new(params[:tv_show])
respond_to do |format|
if @tv_show.save
format.html { redirect_to(tv_shows_path, :notice => 'Tv show was successfully created.') }
format.xml { render :xml => @tv_show, :status => :created, :location => @tv_show }
else
format.html { render :action => "new" }
format.xml { render :xml => @tv_show.errors, :status => :unprocessable_entity }
end
end
end
의 코드를 다음 한 리디렉션 후 표시되지주의 사항 tv_shows_path로 리디렉션 한 후 알림 메시지가 나타나지 않는 새 항목을 만듭니다. 누구에게 왜 아이디어가 있습니까?
당신이 구체적 일지 궁금합니다. 나는 똑같은 문제를 겪고 있는데,이 대답은 도움이되지 않습니다. 내 컨트롤러에는 before_filter : authenticate_user!가 있습니다. 틀렸어? –
미안하지만 나는 1 년 전에 그 문제가 무엇인지 모릅니다. 지금은 레일즈 3.1부터 has_secure_password를 사용하고 있습니다. http://railscasts.com/episodes/270-authentication-in-rails-3-1 – maveonair