lib/faceted/model.rb in faceted-0.7.0 vs lib/faceted/model.rb in faceted-0.7.1

- old
+ new

@@ -23,9 +23,13 @@ obj = self.new(params) obj.save obj end + def expose(name, args={}) + field(name, args={}) + end + def field(name, args={}) fields << name define_method :"#{name}" do instance_variable_get("@#{name}") || args[:default] end