본문 바로가기

카테고리 없음

[ruby on rails] html으로 form 작성해서 post로 보낸후 세션 값이 싹 지워질때...

ApplicationController 클래스안의 protect_from_forgery 를 보아라... 

http://guides.rubyonrails.org/security.html#cross-site-request-forgery-csrf 

plain으로 작성하지 말고 form_for 을 쓰랜다...

http://www.noppanit.com/rails-lost-session-after-doing-a-post/