lib/frenchy/model.rb in frenchy-0.2.5 vs lib/frenchy/model.rb in frenchy-0.2.6

- old
+ new

@@ -24,9 +24,19 @@ # Return a hash of field name as string and value pairs def attributes Hash[self.class.fields.map {|k,_| [k, send(k)]}] end + # Returns a copy of the model + def to_model + self + end + + # Returns that the model is persisted + def persisted? + true + end + # Return a string representing the value of the model instance def inspect "<#{self.class.name} #{attributes.map {|k,v| "#{k}: #{v.inspect}"}.join(", ")}>" end