Posted by: imam fahrur rozi on: November 15, 2008
Ketika mau blajar session di Ruby on Rails, muncul error “No :secret given to the #protect_from_forgery call. Set that or use a session store capable of generating its own keys (Cookie Session Store)”. Error ini muncul ketika konfigurasi environment.rb saya ubah dengan menghailangkan tanda komentar di baris :
config.action_controller.session_store = :active_record_store
Cara memperbaiki error tersebut adalah dengan meng-uncomment baris secret, dikasus saya:
:secret => ‘14b67177af524cff2a6259fb5c5905eb’
yang ada di file application.rb
![]()
Recent Comments