extracted helper methods from app.rb to their own module