patch: update models/flag.rb + dependencies for Rails4