summaryrefslogtreecommitdiff
path: root/app/helpers/users_helper.rb
blob: 1b2dc5d227e1b512ae823aa0b91fc7611f487beb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
module UsersHelper

  def user_form_class(*classes)
    (classes + ['user', 'hidden', 'js-show', (@user.new_record? ? 'new' : 'edit')]).compact.join(' ')
  end

  def wrapped(item, options = {})
    options[:as] ||= :div
    content_tag options[:as], :class => dom_class(item), :id => dom_id(item) do
      yield
    end
  end

end