RailsCasts Pro episodes are now free!
Learn more or hide this
GitHub User: Lukom
Site: http://lukom.org/
Nice episode, but I would recommend to set Http-only setting for auth-cookies so if site somehow have xss hole attacker cannot steal cookies through javascript.
Cool, very helpful topic. I like the trick: var new_id = new Date().getTime();
Just for comparison (the same markup with rails content_tag helper):
content_tag :div, nil, :class => 'error_messages' do content = content_tag(:h2, "... errors occurred") content << content_tag(:p, "There were problems...:") content << content_tag(:ul) do object.errors.to_a.map do |msg| content_tag :li, msg end.join.html_safe end end
Nice episode, but I would recommend to set Http-only setting for auth-cookies so if site somehow have xss hole attacker cannot steal cookies through javascript.
Cool, very helpful topic. I like the trick:
var new_id = new Date().getTime();
Just for comparison (the same markup with rails content_tag helper):
content_tag :div, nil, :class => 'error_messages' do
content = content_tag(:h2, "... errors occurred")
content << content_tag(:p, "There were problems...:")
content << content_tag(:ul) do
object.errors.to_a.map do |msg|
content_tag :li, msg
end.join.html_safe
end
end