spec/fixtures/more/article.rb in peterpunk-couchrest-0.33 vs spec/fixtures/more/article.rb in peterpunk-couchrest-0.34.1

- old
+ new

@@ -24,11 +24,11 @@ property :title property :tags timestamps! - save_callback :before, :generate_slug_from_title + before_save :generate_slug_from_title def generate_slug_from_title - self['slug'] = title.downcase.gsub(/[^a-z0-9]/,'-').squeeze('-').gsub(/^\-|\-$/,'') if new_document? + self['slug'] = title.downcase.gsub(/[^a-z0-9]/,'-').squeeze('-').gsub(/^\-|\-$/,'') if new? end end \ No newline at end of file