Module: Flexite::ApplicationHelper

Defined in:
app/helpers/flexite/application_helper.rb

Instance Method Summary collapse

Instance Method Details

#back_to_appObject



8
9
10
# File 'app/helpers/flexite/application_helper.rb', line 8

def back_to_app
  link_to "Back to #{Flexite.config.app_name}", Flexite.config.app_link, class: 'btn btn-default'
end

#present(*args, presenter) {|klass.new(self, *args)| ... } ⇒ Object

Yields:

  • (klass.new(self, *args))


3
4
5
6
# File 'app/helpers/flexite/application_helper.rb', line 3

def present(*args, presenter)
  klass = "Flexite::#{presenter.to_s.camelize}Presenter".constantize
  yield(klass.new(self, *args))
end

#stage_selectObject



12
13
14
# File 'app/helpers/flexite/application_helper.rb', line 12

def stage_select
  select_tag :stage, options_for_select(Flexite.config.stages), class: 'form-control'
end