lib/generators/cream/app/app_generator.rb in cream-0.9.1 vs lib/generators/cream/app/app_generator.rb in cream-0.9.2

- old
+ new

@@ -76,21 +76,31 @@ %Q{ # modify this as needed (for any forms using current_user) # attr_accessor :login, :password # attr_accessor :username, :email # attr_accessor :country, :country_code, :language, :language_code, :city - - def self.create options = {} - Guest.new options.merge(session[:guest_options] || {}) - end - def save - false - end - - def save! - false + include ActiveModel::Validations + include ActiveModel::Conversion + extend ActiveModel::Naming + + def initialize(attributes = {}) + attributes.each do |name, value| + send("\#{name}=", value) + end end + + def self.create options = {} + Guest.new options + end + + # def save + # false + # end + # + # def save! + # false + # end def is? role role == :guest end \ No newline at end of file