lib/generators/cream/app/app_generator.rb in cream-0.8.9 vs lib/generators/cream/app/app_generator.rb in cream-0.8.9.1
- old
+ new
@@ -72,11 +72,17 @@
end
def create_guest_user
remove_model :guest if has_model?(:guest)
create_model :guest do
- %Q{
+ %Q{
+ # modify this as needed for now!
+ # attr_accessor :login, :username, :email
+ # attr_accessor :password
+ #
+ # attr_accessible :login
+
def self.create
Guest.new
end
def is? role
@@ -90,10 +96,10 @@
def has_roles? *roles
false
end
def has_any_role? *roles
- roles.flat_uniq..to_symbols.include? :guest
+ roles.flat_uniq.to_symbols.include?(:guest)
end
}
end
say "A Guest user model has been created. Users that have not signed in will get an instance of this class as the current_user."
end
\ No newline at end of file