lib/generators/roles/config/config_generator.rb in cream-0.7.7 vs lib/generators/roles/config/config_generator.rb in cream-0.7.8
- old
+ new
@@ -19,12 +19,12 @@
def configure_roles
logger.add_logfile :logfile => logfile if logfile
roles_gems if gems?
create_roles
- set_valid_roles_cream
- use_roles_strategy
+ use_roles_strategy
+ set_valid_roles_cream
end
protected
include Rails3::Assist::BasicLogger
@@ -90,10 +90,10 @@
def set_valid_roles_cream
user_exist?
if initializer_file? :cream
if read_model(:user) =~ /valid_roles_are/
- replace_in_model_file :user, :where => /valid_roles_are\s+[(.*)]/, :with => 'valid_roles_are Cream.roles'
+ replace_in_model :user, :where => /valid_roles_are\s+[(.*)]/, :with => 'valid_roles_are Cream.roles'
else
insert_into_model :user do
"valid_roles_are Cream::Role.available"
end
end
\ No newline at end of file