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

  def user_form_class(*classes)
    (classes + ['user', 'form', (@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