Module: SelectionsHelper

Defined in:
lib/generators/selections_scaffold/templates/selections_helper.rb

Instance Method Summary collapse

Instance Method Details

#selector(selection) ⇒ Object



2
3
4
5
6
7
8
9
# File 'lib/generators/selections_scaffold/templates/selections_helper.rb', line 2

def selector(selection)
  if selection.leaf?
    link_to_unless selection.parent.try(:is_system), selection.name,
                   edit_selection_selection_path(@parent, selection)
  else
    link_to selection.name, selection_selections_path(selection)
  end
end