RailsCasts Pro episodes are now free!
Learn more or hide this
Resources
gem install brakeman rbenv rehash brakeman brakeman -o brakeman.html bundle update rails brakeman --rake
config.active_record.whitelist_attributes = true
def index direction = params[:direction] == "desc" ? "desc" : "asc" @products = Product.order("name #{direction}") end
redirect_to redirect_url, only_path: true
validates_format_of :name, with: /\A\w+\z/
gem 'brakeman', group: :development