This commit is contained in:
albert 2013-02-19 13:50:30 -05:00
parent e725455dea
commit 0343220f8e
4 changed files with 16 additions and 2 deletions

View File

@ -99,6 +99,7 @@ class Upload < ActiveRecord::Base
p.file_size = file_size
p.uploader_id = uploader_id
p.uploader_ip_addr = uploader_ip_addr
p.parent_id = parent_id
unless uploader.is_contributor?
p.is_pending = true

View File

@ -38,6 +38,11 @@
</fieldset>
</div>
<div class="input">
<%= f.label :parent_id, "Parent ID" %>
<%= f.text_field :parent_id %>
</div>
<div class="input">
<div>
<%= f.label :tag_string, "Tags" %>

View File

@ -0,0 +1,5 @@
class AddParentIdToUploads < ActiveRecord::Migration
def change
add_column :uploads, :parent_id, :integer
end
end

View File

@ -2476,7 +2476,8 @@ CREATE TABLE uploads (
md5_confirmation character varying(255),
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL,
server text
server text,
parent_id integer
);
@ -6177,4 +6178,6 @@ INSERT INTO schema_migrations (version) VALUES ('20130106210658');
INSERT INTO schema_migrations (version) VALUES ('20130114154400');
INSERT INTO schema_migrations (version) VALUES ('20130219171111');
INSERT INTO schema_migrations (version) VALUES ('20130219171111');
INSERT INTO schema_migrations (version) VALUES ('20130219184743');