end Thread Safety: Thread.current around_filter :set_context def set_context if logged_in? Thread.current[:user_id] = current_user.id end yield Thread.current[:user_id] = nil end
User.create(user_params) end def user_params params. require(:user). permit(:name, :login, :email) end end Strong Parameters https://github.com/rails/strong_parameters
SHA256 SHA512 426 million / s 85 million / s 65 million / s 13 million / s GPU cluster MD5 SHA SHA256 SHA512 BILLIONS PER SECOND * http://www.insidepro.com/eng/egb.shtml
a MySQL text field. Instead, send the minimum required information. Security: Serialization Background.enqueue(DoStuffJob, @user.id) Death by Eager Loading Recursion
:period => 60.seconds ) do |request| if request.post? && request.path =~ %r{^/comments} request.env["action_dispatch.remote_ip"] end end ActiveSupport::Notifications.subscribe("rack.attack") do |*args| Stats.increment("request.throttled") end config.middleware.insert_after( ActionDispatch::RemoteIp, Rack::Attack )