Removed #generate_with_protected helper methods.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9471 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2012-04-22 12:45:13 +00:00
parent 95f9246a46
commit 2e3bf71e9a
5 changed files with 25 additions and 36 deletions

View File

@@ -1,18 +1,4 @@
module ObjectHelpers
# TODO: Remove these three once everyone has ported their code to use the
# new object_daddy version with protected attribute support
def User.generate_with_protected(attributes={})
User.generate(attributes)
end
def User.generate_with_protected!(attributes={})
User.generate!(attributes)
end
def User.spawn_with_protected(attributes={})
User.spawn(attributes)
end
def User.add_to_project(user, project, roles)
roles = [roles] unless roles.is_a?(Array)
Member.create!(:principal => user, :project => project, :roles => roles)