This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Validate the length of the string | |
validates_length_of :username, :minimum => 5, :maximum => 255, :allow_blank => false | |
# or | |
validates :password, :length => { :minimum => 6 }, allow_blank: true | |
# Validate paperclip attachment | |
validates_attachment :profile_image, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
heroku config:add RAKE_ENV=staging --remote staging | |
heroku config:add RAILS_ENV=staging --remote staging | |
# if you have parity gem installed: | |
staging config:add RAKE_ENV=staging | |
staging config:add RAILS_ENV=staging | |
# check out parity gem, designed specifically for heroku https://github.com/croaky/parity |