summaryrefslogtreecommitdiff
path: root/app/helpers/users_helper.rb
diff options
context:
space:
mode:
authorAzul <azul@leap.se>2014-04-08 11:49:14 +0200
committerAzul <azul@leap.se>2014-04-08 11:49:14 +0200
commitb6d14dc19dd350a807826e3e097738a36613e083 (patch)
tree093dc5f2f1e773e3ad009d28d1fd24667d3c0ba6 /app/helpers/users_helper.rb
parent2e11e3ca2c7b02fdb5ff54f0bcd766cc5fa39975 (diff)
moving users: app and test files
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