fixes #404
This commit is contained in:
@@ -99,6 +99,7 @@ class Upload < ActiveRecord::Base
|
|||||||
p.file_size = file_size
|
p.file_size = file_size
|
||||||
p.uploader_id = uploader_id
|
p.uploader_id = uploader_id
|
||||||
p.uploader_ip_addr = uploader_ip_addr
|
p.uploader_ip_addr = uploader_ip_addr
|
||||||
|
p.parent_id = parent_id
|
||||||
|
|
||||||
unless uploader.is_contributor?
|
unless uploader.is_contributor?
|
||||||
p.is_pending = true
|
p.is_pending = true
|
||||||
|
|||||||
@@ -38,6 +38,11 @@
|
|||||||
</fieldset>
|
</fieldset>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="input">
|
||||||
|
<%= f.label :parent_id, "Parent ID" %>
|
||||||
|
<%= f.text_field :parent_id %>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="input">
|
<div class="input">
|
||||||
<div>
|
<div>
|
||||||
<%= f.label :tag_string, "Tags" %>
|
<%= f.label :tag_string, "Tags" %>
|
||||||
|
|||||||
5
db/migrate/20130219184743_add_parent_id_to_uploads.rb
Normal file
5
db/migrate/20130219184743_add_parent_id_to_uploads.rb
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
class AddParentIdToUploads < ActiveRecord::Migration
|
||||||
|
def change
|
||||||
|
add_column :uploads, :parent_id, :integer
|
||||||
|
end
|
||||||
|
end
|
||||||
@@ -2476,7 +2476,8 @@ CREATE TABLE uploads (
|
|||||||
md5_confirmation character varying(255),
|
md5_confirmation character varying(255),
|
||||||
created_at timestamp without time zone NOT NULL,
|
created_at timestamp without time zone NOT NULL,
|
||||||
updated_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 ('20130114154400');
|
||||||
|
|
||||||
INSERT INTO schema_migrations (version) VALUES ('20130219171111');
|
INSERT INTO schema_migrations (version) VALUES ('20130219171111');
|
||||||
|
|
||||||
|
INSERT INTO schema_migrations (version) VALUES ('20130219184743');
|
||||||
Reference in New Issue
Block a user