cirandas.net

ref: master

app/helpers/features_helper.rb


 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
module FeaturesHelper
  def select_organization_approval_method(object, method)
    choices = [
      [ _('Administrator must approve all new organizations'), 'admin'],
      [ _('Administrator assigns validator organizations per region.'), 'region'],
      [ _('All new organizations are approve by default'), 'none'],
    ]
    value = instance_variable_get("@#{object}").send(method).to_s
    select_tag("#{object}[#{method}]", options_for_select(choices, value))
  end
end