summaryrefslogtreecommitdiff
path: root/app/helpers/users_helper.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/helpers/users_helper.rb')
-rw-r--r--app/helpers/users_helper.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/app/helpers/users_helper.rb b/app/helpers/users_helper.rb
new file mode 100644
index 0000000..f56faab
--- /dev/null
+++ b/app/helpers/users_helper.rb
@@ -0,0 +1,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