fix permission model
add Heroku support for Rails 4