Modified: branches/components/app/controllers/content_types_controller.rb (3247 => 3248)
--- branches/components/app/controllers/content_types_controller.rb 2012-12-11 09:42:53 UTC (rev 3247)
+++ branches/components/app/controllers/content_types_controller.rb 2012-12-11 09:56:46 UTC (rev 3248)
@@ -12,8 +12,13 @@
params[:num] = 25 unless params[:num]
- @content_types = ContentType.find(:all, :order => 'title ASC',
- :page => { :size => params[:num], :current => params[:page] })
+ if params[:mime_type]
+ @content_types = ContentType.find_all_by_mime_type(params[:mime_type], :order => 'title ASC',
+ :page => { :size => params[:num], :current => params[:page] })
+ else
+ @content_types = ContentType.find(:all, :order => 'title ASC',
+ :page => { :size => params[:num], :current => params[:page] })
+ end
end
# GET /content_types/1