code before rails_12factor refavator