Creates a new instance of category.
# File vendor/plugins/ubiquo_categories/lib/ubiquo_categories/connectors/i18n.rb, line 202
202: def uhook_create_category
203: category = ::Category.new(params[:category])
204: category.locale = current_locale
205: category
206: end
Destroys a category instance. returns a success boolean
# File vendor/plugins/ubiquo_categories/lib/ubiquo_categories/connectors/i18n.rb, line 209
209: def uhook_destroy_category(category)
210: destroyed = false
211: if params[:destroy_content]
212: destroyed = category.destroy_content
213: else
214: destroyed = category.destroy
215: end
216: destroyed
217: end
Performs any required action on category when in edit
# File vendor/plugins/ubiquo_categories/lib/ubiquo_categories/connectors/i18n.rb, line 194
194: def uhook_edit_category category
195: unless category.in_locale?(current_locale)
196: redirect_to(ubiquo_category_set_categories_url)
197: false
198: end
199: end
Returns a hash with extra filters to apply
# File vendor/plugins/ubiquo_categories/lib/ubiquo_categories/connectors/i18n.rb, line 170
170: def uhook_index_filters
171: {:locale => params[:filter_locale]}
172: end
Returns a subject that will have applied the index filters (e.g. a class, with maybe some scopes applied)
# File vendor/plugins/ubiquo_categories/lib/ubiquo_categories/connectors/i18n.rb, line 176
176: def uhook_index_search_subject
177: ::Category.locale(current_locale, :all)
178: end
Initializes a new instance of category.
# File vendor/plugins/ubiquo_categories/lib/ubiquo_categories/connectors/i18n.rb, line 181
181: def uhook_new_category
182: ::Category.translate(params[:from], current_locale, :copy_all => true)
183: end
Performs any required action on category when in show
# File vendor/plugins/ubiquo_categories/lib/ubiquo_categories/connectors/i18n.rb, line 186
186: def uhook_show_category category
187: unless category.in_locale?(current_locale)
188: redirect_to(ubiquo_category_set_categories_url)
189: false
190: end
191: end
Disabled; run with $DEBUG to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.