RailsCasts Pro episodes are now free!

Learn more or hide this

Lev Lukomsky's Profile

GitHub User: Lukom

Site: http://lukom.org/

Comments by Lev Lukomsky

Avatar

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.

Avatar

Cool, very helpful topic. I like the trick:
var new_id = new Date().getTime();

Avatar

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