I have lot of helpers in my main Sinatra project_name.rb and I want to remove them to the external file, what is the best practice to do that ?
from ./preject_name.rb
helpers do
...#bunch of helpers
end
to for exapmple ./helpers/something.rb
thank you
The simple and recommended way:
module ApplicationHelper
# methods
end
class Main < Sinatra::Base
helpers ApplicationHelper
end