Adds the categories to the set and returns the categories that will be effectively related to object
# File vendor/plugins/ubiquo_categories/lib/ubiquo_categories/connectors/i18n.rb, line 254
254: def uhook_assign_to_set set, categories, object
255: if object.class.is_translatable?
256: locale = object.locale || Locale.current
257: end
258: categories_options = {}
259: categories_options.merge!(:locale => locale)
260:
261: set.categories << [categories, categories_options]
262: categories = Array(categories).reject(&:blank?)
263: categories.map do |c|
264: set.select_fittest(c, :locale => locale)
265: end.uniq.compact
266: end
Defines the relation as translation_shared if is a translatable class
# File vendor/plugins/ubiquo_categories/lib/ubiquo_categories/connectors/i18n.rb, line 269
269: def uhook_categorized_with field, options
270: association_name = field.to_s.pluralize.to_sym
271: if self.is_translatable?
272: share_translations_for association_name
273: end
274: end
Disabled; run with $DEBUG to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.