lib/generators/cream/helpers/args_helper.rb in cream-0.8.9.1 vs lib/generators/cream/helpers/args_helper.rb in cream-0.8.9.2
- old
+ new
@@ -48,15 +48,31 @@
def strategy
options[:strategy]
end
+ def user_types
+ options[:user_types]
+ end
+
def admin_user?
options[:admin_user]
end
def sym_roles
roles.map(&:to_sym)
+ end
+
+ def guest_user?
+ options[:guest_user]
+ end
+
+ def user_types_code
+ user_types.map {|ut| "'#{ut}'"}.join(', ')
+ end
+
+ def user_types_list
+ user_types.map {|ut| "#{ut}"}.join(' ')
end
def user_class
options[:user_class] || 'User'
end
\ No newline at end of file