myexperiment-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[myexperiment-hackers] [2891] trunk/app/controllers: add new content typ


From: noreply
Subject: [myexperiment-hackers] [2891] trunk/app/controllers: add new content type categories automatically
Date: Wed, 4 Jan 2012 07:49:22 -0500 (EST)

Revision
2891
Author
dgc
Date
2012-01-04 07:49:21 -0500 (Wed, 04 Jan 2012)

Log Message

add new content type categories automatically

Modified Paths

Diff

Modified: trunk/app/controllers/blobs_controller.rb (2890 => 2891)


--- trunk/app/controllers/blobs_controller.rb	2012-01-04 11:50:17 UTC (rev 2890)
+++ trunk/app/controllers/blobs_controller.rb	2012-01-04 12:49:21 UTC (rev 2891)
@@ -136,7 +136,7 @@
       @blob.content_type = ContentType.find_by_mime_type(content_type)
 
       if @blob.content_type.nil?
-        @blob.content_type = ContentType.create(:user_id => current_user.id, :mime_type => content_type, :title => content_type)
+        @blob.content_type = ContentType.create(:user_id => current_user.id, :mime_type => content_type, :title => content_type, :category => 'Blob')
       end
 
       respond_to do |format|

Modified: trunk/app/controllers/workflows_controller.rb (2890 => 2891)


--- trunk/app/controllers/workflows_controller.rb	2012-01-04 11:50:17 UTC (rev 2890)
+++ trunk/app/controllers/workflows_controller.rb	2012-01-04 12:49:21 UTC (rev 2891)
@@ -989,7 +989,8 @@
 
         if ct.nil?
           ct = ContentType.create(:user_id => current_user.id,
-            :mime_type => file.content_type, :title => params[:workflow][:type_other])
+            :mime_type => file.content_type, :title => params[:workflow][:type_other],
+            :category => 'Workflow')
         end
 
         workflow_to_set.content_type = ct

reply via email to

[Prev in Thread] Current Thread [Next in Thread]