Skip to content

Commit

Permalink
added warning on constantize rescue
Browse files Browse the repository at this point in the history
  • Loading branch information
kristianmandrup committed Jan 21, 2011
1 parent 8ff08b8 commit 41f8540
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion VERSION
@@ -1 +1 @@
0.3.7
0.3.7.1
6 changes: 5 additions & 1 deletion lib/roles_generic/generic/role.rb
Expand Up @@ -12,7 +12,11 @@ def role_class_name

def role_class class_constant
const = class_constant.to_s.camelize
@role_class_name = "#{const}".constantize
begin
@role_class_name = "#{const}".constantize
rescue
puts "Role class constant '#{const}' is not defined so it could not be set!"
end
end
end
end

0 comments on commit 41f8540

Please sign in to comment.