lib/sluggable_finder/orm.rb in sluggable_finder-2.2.1 vs lib/sluggable_finder/orm.rb in sluggable_finder-2.2.2

- old
+ new

@@ -17,11 +17,12 @@ :sluggable_type => ActiveRecord::Base.send(:class_name_of_active_record_descendant, self).to_s, :from => field, :scope => nil, :to => :slug, :reserved_slugs => [], - :allow_integer_ids => true + :allow_integer_ids => true, + :upcase => false }.merge( options )) class_inheritable_reader :sluggable_finder_options if sluggable_finder_options[:scope] scope_condition_method = %( @@ -83,9 +84,10 @@ proposed_slug = if self.send(destination_column.to_sym).blank? # self.slug SluggableFinder.encode get_value_or_generate_random(source_column.to_sym) # self.title else SluggableFinder.encode get_value_or_generate_random(destination_column.to_sym) # self.slug end + proposed_slug = proposed_slug.upcase if sluggable_finder_options[:upcase] rescue Exception => e raise e end cond = if new_record? '' \ No newline at end of file