uploadcare-rails 1.2.0.pre.alpha3 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +5 -16
- data/lib/generators/templates/uploadcare_config_template.erb +138 -0
- data/lib/generators/uploadcare_config_generator.rb +7 -4
- data/lib/uploadcare/errors/type_error.rb +7 -0
- data/lib/uploadcare/rails/action_view/uploadcare_include_tags.rb +48 -0
- data/lib/uploadcare/rails/action_view/uploadcare_uploader_tags.rb +57 -0
- data/lib/uploadcare/rails/active_record/mount_uploadcare_file.rb +62 -0
- data/lib/uploadcare/rails/active_record/mount_uploadcare_file_group.rb +58 -0
- data/lib/uploadcare/rails/api/rest/base.rb +14 -0
- data/lib/uploadcare/rails/api/rest/conversion_api.rb +42 -0
- data/lib/uploadcare/rails/api/rest/file_api.rb +69 -0
- data/lib/uploadcare/rails/api/rest/group_api.rb +48 -0
- data/lib/uploadcare/rails/api/rest/project_api.rb +27 -0
- data/lib/uploadcare/rails/api/rest/webhook_api.rb +45 -0
- data/lib/uploadcare/rails/api/upload/base.rb +13 -0
- data/lib/uploadcare/rails/api/upload/upload_api.rb +53 -0
- data/lib/uploadcare/rails/configuration.rb +57 -0
- data/lib/uploadcare/rails/engine.rb +13 -17
- data/lib/uploadcare/rails/jobs/delete_file_job.rb +14 -0
- data/lib/uploadcare/rails/jobs/store_file_job.rb +14 -0
- data/lib/uploadcare/rails/jobs/store_group_job.rb +14 -0
- data/lib/uploadcare/rails/objects/concerns/loadable.rb +46 -0
- data/lib/uploadcare/rails/objects/file.rb +40 -20
- data/lib/uploadcare/rails/objects/group.rb +51 -57
- data/lib/uploadcare/rails/services/files_count_extractor.rb +14 -0
- data/lib/uploadcare/rails/services/id_extractor.rb +15 -0
- data/lib/uploadcare/rails/transformations/image_transformations.rb +45 -0
- data/lib/uploadcare/rails/version.rb +3 -1
- data/lib/uploadcare/rails.rb +10 -0
- data/lib/uploadcare-rails.rb +27 -16
- data/spec/fixtures/kitten.jpeg +0 -0
- data/spec/fixtures/vcr_cassettes/conversion_api_convert_document.yml +62 -0
- data/spec/fixtures/vcr_cassettes/conversion_api_convert_document_with_error.yml +62 -0
- data/spec/fixtures/vcr_cassettes/conversion_api_convert_video.yml +62 -0
- data/spec/fixtures/vcr_cassettes/conversion_api_convert_video_with_error.yml +62 -0
- data/spec/fixtures/vcr_cassettes/conversion_api_get_document_conversion_status.yml +59 -0
- data/spec/fixtures/vcr_cassettes/conversion_api_get_video_conversion_status.yml +59 -0
- data/spec/fixtures/vcr_cassettes/file_api_copy_file.yml +60 -0
- data/spec/fixtures/vcr_cassettes/file_api_delete_file.yml +58 -0
- data/spec/fixtures/vcr_cassettes/file_api_delete_files.yml +58 -0
- data/spec/fixtures/vcr_cassettes/file_api_get_file.yml +58 -0
- data/spec/fixtures/vcr_cassettes/file_api_get_files.yml +61 -0
- data/spec/fixtures/vcr_cassettes/file_api_load_file.yml +57 -0
- data/spec/fixtures/vcr_cassettes/file_api_store_file.yml +58 -0
- data/spec/fixtures/vcr_cassettes/file_api_store_files.yml +57 -0
- data/spec/fixtures/vcr_cassettes/group_api_create_group.yml +57 -0
- data/spec/fixtures/vcr_cassettes/group_api_get_group.yml +52 -0
- data/spec/fixtures/vcr_cassettes/group_api_get_groups.yml +57 -0
- data/spec/fixtures/vcr_cassettes/group_api_store_group.yml +57 -0
- data/spec/fixtures/vcr_cassettes/project_api_get_project.yml +59 -0
- data/spec/fixtures/vcr_cassettes/upload_upload_many_files.yml +55 -0
- data/spec/fixtures/vcr_cassettes/upload_upload_one_file.yml +105 -0
- data/spec/fixtures/vcr_cassettes/upload_upload_one_file_from_cdn.yml +111 -0
- data/spec/fixtures/vcr_cassettes/webhook_api_create_webhook.yml +59 -0
- data/spec/fixtures/vcr_cassettes/webhook_api_delete_webhook.yml +57 -0
- data/spec/fixtures/vcr_cassettes/webhook_api_get_webhooks.yml +59 -0
- data/spec/fixtures/vcr_cassettes/webhook_api_update_webhook.yml +59 -0
- data/spec/generators/uploadcare_config_generator_spec.rb +18 -26
- data/spec/spec_helper.rb +17 -62
- data/spec/support/generators.rb +8 -5
- data/spec/support/vcr.rb +14 -0
- data/spec/uploadcare/rails/action_view/uploadcare_uploader_tags_spec.rb +40 -0
- data/spec/uploadcare/rails/action_view/uploadcare_widget_tags_spec.rb +46 -0
- data/spec/uploadcare/rails/active_record/mount_uploadcare_file_spec.rb +33 -0
- data/spec/uploadcare/rails/active_record/mount_uploadcare_group_spec.rb +32 -0
- data/spec/uploadcare/rails/api/rest/conversion_api_spec.rb +110 -0
- data/spec/uploadcare/rails/api/rest/file_api_spec.rb +85 -0
- data/spec/uploadcare/rails/api/rest/group_api_spec.rb +61 -0
- data/spec/uploadcare/rails/api/rest/project_api_spec.rb +33 -0
- data/spec/uploadcare/rails/api/rest/webhook_api_spec.rb +67 -0
- data/spec/uploadcare/rails/api/upload/upload_api_spec.rb +82 -0
- data/spec/uploadcare/rails/jobs/delete_file_job_spec.rb +15 -0
- data/spec/uploadcare/rails/jobs/store_file_job_spec.rb +15 -0
- data/spec/uploadcare/rails/jobs/store_group_job_spec.rb +15 -0
- data/spec/uploadcare/rails/objects/file_spec.rb +77 -0
- data/spec/uploadcare/rails/objects/group_spec.rb +87 -0
- data/spec/uploadcare/rails/services/id_extractor_spec.rb +26 -0
- data/spec/uploadcare/rails/transformations/image_transformations_spec.rb +120 -0
- data/spec/uploadcare/rails_spec.rb +7 -0
- metadata +129 -393
- data/config/initializers/uploadcare.rb +0 -26
- data/config/uploadcare_defaults.yml +0 -12
- data/lib/generators/templates/uploadcare_config_template.yml +0 -71
- data/lib/tasks/uploadcare_rails_tasks.rake +0 -4
- data/lib/uploadcare/rails/action_view/include_tags.rb +0 -47
- data/lib/uploadcare/rails/action_view/uploader_tags.rb +0 -76
- data/lib/uploadcare/rails/active_record/has_file.rb +0 -89
- data/lib/uploadcare/rails/active_record/has_group.rb +0 -84
- data/lib/uploadcare/rails/active_record/has_object.rb +0 -9
- data/lib/uploadcare/rails/formtastic/formtastic.rb +0 -73
- data/lib/uploadcare/rails/operations.rb +0 -57
- data/lib/uploadcare/rails/settings.rb +0 -81
- data/lib/uploadcare/rails/simple_form/simple_form.rb +0 -63
- data/spec/caching/file_caching_spec.rb +0 -26
- data/spec/caching/group_caching_spec.rb +0 -40
- data/spec/cassettes/Uploadcare_Rails_File/should_load_itself.yml +0 -263
- data/spec/cassettes/Uploadcare_Rails_Group/group_should_stay_loaded.yml +0 -263
- data/spec/cassettes/Uploadcare_Rails_Group/rails_cache_should_updates_after_load_call.yml +0 -263
- data/spec/cassettes/group_cahsing_file_load.yml +0 -263
- data/spec/cassettes/has_uploadcare_file/object_with_uploadcare_file/deletes_file_after_destroy.yml +0 -1763
- data/spec/cassettes/has_uploadcare_file/object_with_uploadcare_file/stores_file_after_save.yml +0 -543
- data/spec/cassettes/has_uploadcare_group/object_attachment/contains_files_inside.yml +0 -679
- data/spec/cassettes/has_uploadcare_group_save.yml +0 -705
- data/spec/cassettes/load_group.yml +0 -263
- data/spec/dummy/README.rdoc +0 -28
- data/spec/dummy/Rakefile +0 -6
- data/spec/dummy/app/assets/javascripts/application.js +0 -13
- data/spec/dummy/app/assets/javascripts/post_with_collections.js +0 -2
- data/spec/dummy/app/assets/javascripts/posts.js +0 -2
- data/spec/dummy/app/assets/javascripts/posts_with_collection_and_files.js +0 -2
- data/spec/dummy/app/assets/stylesheets/application.css +0 -13
- data/spec/dummy/app/assets/stylesheets/post_with_collections.css +0 -4
- data/spec/dummy/app/assets/stylesheets/posts.css +0 -4
- data/spec/dummy/app/assets/stylesheets/posts_with_collection_and_files.css +0 -4
- data/spec/dummy/app/assets/stylesheets/scaffold.css +0 -56
- data/spec/dummy/app/controllers/application_controller.rb +0 -5
- data/spec/dummy/app/controllers/post_with_collections_controller.rb +0 -58
- data/spec/dummy/app/controllers/posts_controller.rb +0 -58
- data/spec/dummy/app/controllers/posts_with_collection_and_files_controller.rb +0 -58
- data/spec/dummy/app/helpers/application_helper.rb +0 -2
- data/spec/dummy/app/helpers/post_with_collections_helper.rb +0 -2
- data/spec/dummy/app/helpers/posts_helper.rb +0 -2
- data/spec/dummy/app/helpers/posts_with_collection_and_files_helper.rb +0 -2
- data/spec/dummy/app/models/post.rb +0 -3
- data/spec/dummy/app/models/post_with_collection.rb +0 -3
- data/spec/dummy/app/models/posts_with_collection_and_file.rb +0 -4
- data/spec/dummy/app/views/layouts/application.html.erb +0 -16
- data/spec/dummy/app/views/post_with_collections/_form.html.erb +0 -25
- data/spec/dummy/app/views/post_with_collections/edit.html.erb +0 -6
- data/spec/dummy/app/views/post_with_collections/index.html.erb +0 -29
- data/spec/dummy/app/views/post_with_collections/new.html.erb +0 -5
- data/spec/dummy/app/views/post_with_collections/show.html.erb +0 -14
- data/spec/dummy/app/views/post_with_collections/show.json.jbuilder +0 -1
- data/spec/dummy/app/views/posts/_form.html.erb +0 -31
- data/spec/dummy/app/views/posts/edit.html.erb +0 -6
- data/spec/dummy/app/views/posts/index.html.erb +0 -37
- data/spec/dummy/app/views/posts/new.html.erb +0 -5
- data/spec/dummy/app/views/posts/post.json.builder +0 -1
- data/spec/dummy/app/views/posts/show.html.erb +0 -15
- data/spec/dummy/app/views/posts_with_collection_and_files/_form.html.erb +0 -27
- data/spec/dummy/app/views/posts_with_collection_and_files/edit.html.erb +0 -6
- data/spec/dummy/app/views/posts_with_collection_and_files/index.html.erb +0 -25
- data/spec/dummy/app/views/posts_with_collection_and_files/new.html.erb +0 -5
- data/spec/dummy/app/views/posts_with_collection_and_files/show.html.erb +0 -4
- data/spec/dummy/app/views/posts_with_collection_and_files/show.json.jbuilder +0 -1
- data/spec/dummy/bin/bundle +0 -3
- data/spec/dummy/bin/rails +0 -4
- data/spec/dummy/bin/rake +0 -4
- data/spec/dummy/config/application.rb +0 -23
- data/spec/dummy/config/boot.rb +0 -5
- data/spec/dummy/config/database.yml +0 -25
- data/spec/dummy/config/environment.rb +0 -5
- data/spec/dummy/config/environments/development.rb +0 -29
- data/spec/dummy/config/environments/production.rb +0 -80
- data/spec/dummy/config/environments/test.rb +0 -36
- data/spec/dummy/config/initializers/backtrace_silencers.rb +0 -7
- data/spec/dummy/config/initializers/filter_parameter_logging.rb +0 -4
- data/spec/dummy/config/initializers/formtastic.rb +0 -111
- data/spec/dummy/config/initializers/inflections.rb +0 -16
- data/spec/dummy/config/initializers/mime_types.rb +0 -5
- data/spec/dummy/config/initializers/secret_token.rb +0 -12
- data/spec/dummy/config/initializers/session_store.rb +0 -3
- data/spec/dummy/config/initializers/simple_form.rb +0 -167
- data/spec/dummy/config/initializers/wrap_parameters.rb +0 -14
- data/spec/dummy/config/locales/en.yml +0 -23
- data/spec/dummy/config/locales/simple_form.en.yml +0 -31
- data/spec/dummy/config/routes.rb +0 -63
- data/spec/dummy/config/uploadcare.yml +0 -68
- data/spec/dummy/config.ru +0 -4
- data/spec/dummy/db/migrate/20171012001801_create_tables.rb +0 -27
- data/spec/dummy/db/schema.rb +0 -37
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/lib/templates/erb/scaffold/_form.html.erb +0 -13
- data/spec/dummy/log/development.log +0 -0
- data/spec/dummy/log/test.log +0 -3276
- data/spec/dummy/public/404.html +0 -58
- data/spec/dummy/public/422.html +0 -58
- data/spec/dummy/public/500.html +0 -57
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/dummy/tmp/cache/293/091/https%3A%2F%2Fucarecdn.com%2F19073296-2315-4726-817b-46398b2c7431%7E2%2F +0 -0
- data/spec/dummy/tmp/cache/2AF/761/https%3A%2F%2Fucarecdn.com%2F595319d0-a113-459f-91bd-b29c7183467b%2F +0 -0
- data/spec/dummy/tmp/cache/301/D41/https%3A%2F%2Fucarecdn.com%2F81332043-fa2c-452f-936b-737d87ab2ae2%2F +0 -0
- data/spec/dummy/tmp/cache/30A/7C1/https%3A%2F%2Fucarecdn.com%2F39b34128-a001-46fd-9773-1b6ad46e6b9e%2F +0 -0
- data/spec/dummy/tmp/cache/340/A41/https%3A%2F%2Fucarecdn.com%2F090bcb5f-6d19-456c-b4a3-d753e690926f%2F +0 -0
- data/spec/dummy/tmp/cache/3AB/5A1/https%3A%2F%2Fucarecdn.com%2F7eb0161b-cebe-4316-946b-694de6f77ef9%2F +0 -0
- data/spec/dummy/tmp/cache/3FC/5C1/https%3A%2F%2Fucarecdn.com%2Fc3f0464b-ce9a-4281-8eaa-5c55783ccedf%2F +0 -0
- data/spec/dummy/tmp/cache/431/5C1/https%3A%2F%2Fucarecdn.com%2Fa1b1bb40-bd89-4f9c-b809-e84920f24a01%7E2%2F +0 -0
- data/spec/dummy/tmp/cache/44B/7A1/https%3A%2F%2Fucarecdn.com%2Fd6c785a8-9761-4602-88de-65ddb04ddc6a%7E2%2F +0 -0
- data/spec/dummy/tmp/cache/45B/F31/https%3A%2F%2Fucarecdn.com%2F73e3cdbc-6495-4cf2-bbd1-413e6cb70004%7E2%2F +0 -0
- data/spec/dummy/tmp/cache/461/AA1/https%3A%2F%2Fucarecdn.com%2Fc50e9a53-0b95-48ac-a4a9-6744052dbdab%7E2%2F +0 -0
- data/spec/helpers/form_helpers_has_file_spec.rb +0 -30
- data/spec/helpers/form_helpers_has_group_spec.rb +0 -30
- data/spec/helpers/form_helpers_spec.rb +0 -33
- data/spec/helpers/formtastic_spec.rb +0 -25
- data/spec/helpers/include_tags_spec.rb +0 -54
- data/spec/helpers/simple_form_spec.rb +0 -25
- data/spec/helpers/uploader_tags_spec.rb +0 -21
- data/spec/models/has_both_file_and_group_spec.rb +0 -43
- data/spec/models/has_file_spec.rb +0 -46
- data/spec/models/has_group_spec.rb +0 -57
- data/spec/objects/file_spec.rb +0 -27
- data/spec/objects/group_spec.rb +0 -51
- data/spec/operations_spec.rb +0 -28
- data/spec/tmp/config/uploadcare.yml +0 -71
- data/spec/uploadcare/rails/settings_spec.rb +0 -136
- data/spec/uploadcare_rails_settings_spec.rb +0 -56
- data/spec/view.png +0 -0
- data/spec/view2.jpg +0 -0
@@ -1,263 +0,0 @@
|
|
1
|
-
---
|
2
|
-
http_interactions:
|
3
|
-
- request:
|
4
|
-
method: get
|
5
|
-
uri: https://api.uploadcare.com/groups/a1b1bb40-bd89-4f9c-b809-e84920f24a01~2/
|
6
|
-
body:
|
7
|
-
encoding: US-ASCII
|
8
|
-
string: ''
|
9
|
-
headers:
|
10
|
-
Accept:
|
11
|
-
- application/vnd.uploadcare-v0.3+json
|
12
|
-
User-Agent:
|
13
|
-
- uploadcare-ruby/2.3.1.112/1.1.0/demopublickey
|
14
|
-
Date:
|
15
|
-
- Sat, 21 Oct 2017 13:40:36 -0000
|
16
|
-
Authorization:
|
17
|
-
- Uploadcare demopublickey:ca8a4caf8c645dda0b950319fde7c07b60ea9636
|
18
|
-
Accept-Encoding:
|
19
|
-
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
20
|
-
response:
|
21
|
-
status:
|
22
|
-
code: 200
|
23
|
-
message: OK
|
24
|
-
headers:
|
25
|
-
Date:
|
26
|
-
- Sat, 21 Oct 2017 13:40:37 GMT
|
27
|
-
Content-Type:
|
28
|
-
- application/vnd.uploadcare-v0.3+json
|
29
|
-
Transfer-Encoding:
|
30
|
-
- chunked
|
31
|
-
Connection:
|
32
|
-
- keep-alive
|
33
|
-
Server:
|
34
|
-
- nginx
|
35
|
-
X-Xss-Protection:
|
36
|
-
- 1; mode=block
|
37
|
-
X-Content-Type-Options:
|
38
|
-
- nosniff
|
39
|
-
Vary:
|
40
|
-
- Accept
|
41
|
-
Warning:
|
42
|
-
- '199 Miscellaneous warning: You are using the demo account; Please use API
|
43
|
-
version 0.5, not 0.3'
|
44
|
-
Allow:
|
45
|
-
- GET, HEAD, OPTIONS
|
46
|
-
Access-Control-Allow-Origin:
|
47
|
-
- https://uploadcare.com
|
48
|
-
X-Frame-Options:
|
49
|
-
- DENY
|
50
|
-
body:
|
51
|
-
encoding: UTF-8
|
52
|
-
string: '{"id":"a1b1bb40-bd89-4f9c-b809-e84920f24a01~2","datetime_created":"2017-10-21T13:40:29.035828Z","datetime_stored":"2017-10-21T13:40:36.348200Z","files_count":2,"cdn_url":"http://www.ucarecdn.com/a1b1bb40-bd89-4f9c-b809-e84920f24a01~2/","url":"https://api.uploadcare.com/groups/a1b1bb40-bd89-4f9c-b809-e84920f24a01~2/","files":[{"uuid":"83ce550d-f67e-4c1a-a4da-3d550224a8a5","original_file_url":"https://ucarecdn.com/83ce550d-f67e-4c1a-a4da-3d550224a8a5/view2.jpg","image_info":{"orientation":1,"format":"JPEG","height":1162,"width":800,"geo_location":null,"datetime_original":null,"dpi":[72,72]},"datetime_stored":"2017-10-21T13:40:36.247049Z","mime_type":"image/jpeg","is_ready":true,"url":"https://api.uploadcare.com/files/83ce550d-f67e-4c1a-a4da-3d550224a8a5/","original_filename":"view2.jpg","datetime_uploaded":"2017-10-21T13:40:28.343956Z","size":255570,"is_image":true,"datetime_removed":null,"source":null,"variations":null,"default_effects":""},{"uuid":"8bd4d6b5-e844-42a7-b2b1-8814aa4ca713","original_file_url":"https://ucarecdn.com/8bd4d6b5-e844-42a7-b2b1-8814aa4ca713/view.png","image_info":{"orientation":null,"format":"PNG","height":600,"width":800,"geo_location":null,"datetime_original":null,"dpi":null},"datetime_stored":"2017-10-21T13:40:36.318844Z","mime_type":"image/png","is_ready":true,"url":"https://api.uploadcare.com/files/8bd4d6b5-e844-42a7-b2b1-8814aa4ca713/","original_filename":"view.png","datetime_uploaded":"2017-10-21T13:40:28.362231Z","size":2785,"is_image":true,"datetime_removed":null,"source":null,"variations":null,"default_effects":""}]}'
|
53
|
-
http_version:
|
54
|
-
recorded_at: Sat, 21 Oct 2017 13:40:37 GMT
|
55
|
-
- request:
|
56
|
-
method: get
|
57
|
-
uri: https://api.uploadcare.com/groups/d6c785a8-9761-4602-88de-65ddb04ddc6a~2/
|
58
|
-
body:
|
59
|
-
encoding: US-ASCII
|
60
|
-
string: ''
|
61
|
-
headers:
|
62
|
-
Accept:
|
63
|
-
- application/vnd.uploadcare-v0.3+json
|
64
|
-
User-Agent:
|
65
|
-
- uploadcare-ruby/2.3.1.112/1.1.0/demopublickey
|
66
|
-
Date:
|
67
|
-
- Sun, 05 Nov 2017 09:23:09 -0000
|
68
|
-
Authorization:
|
69
|
-
- Uploadcare demopublickey:8b225ef6d71350f07bff3982206c960b7638f3cb
|
70
|
-
Accept-Encoding:
|
71
|
-
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
72
|
-
response:
|
73
|
-
status:
|
74
|
-
code: 200
|
75
|
-
message: OK
|
76
|
-
headers:
|
77
|
-
Date:
|
78
|
-
- Sun, 05 Nov 2017 09:23:10 GMT
|
79
|
-
Content-Type:
|
80
|
-
- application/vnd.uploadcare-v0.3+json
|
81
|
-
Transfer-Encoding:
|
82
|
-
- chunked
|
83
|
-
Connection:
|
84
|
-
- keep-alive
|
85
|
-
Server:
|
86
|
-
- nginx
|
87
|
-
X-Xss-Protection:
|
88
|
-
- 1; mode=block
|
89
|
-
X-Content-Type-Options:
|
90
|
-
- nosniff
|
91
|
-
Vary:
|
92
|
-
- Accept
|
93
|
-
Warning:
|
94
|
-
- '199 Miscellaneous warning: You are using the demo account; Please use API
|
95
|
-
version 0.5, not 0.3'
|
96
|
-
Allow:
|
97
|
-
- GET, HEAD, OPTIONS
|
98
|
-
Access-Control-Allow-Origin:
|
99
|
-
- https://uploadcare.com
|
100
|
-
X-Frame-Options:
|
101
|
-
- DENY
|
102
|
-
body:
|
103
|
-
encoding: UTF-8
|
104
|
-
string: '{"id":"d6c785a8-9761-4602-88de-65ddb04ddc6a~2","datetime_created":"2017-11-05T09:22:59.302130Z","datetime_stored":"2017-11-05T09:23:08.887600Z","files_count":2,"cdn_url":"http://www.ucarecdn.com/d6c785a8-9761-4602-88de-65ddb04ddc6a~2/","url":"https://api.uploadcare.com/groups/d6c785a8-9761-4602-88de-65ddb04ddc6a~2/","files":[{"uuid":"0b37b745-6637-49a1-9c00-3d8281a383e3","original_file_url":"https://ucarecdn.com/0b37b745-6637-49a1-9c00-3d8281a383e3/view2.jpg","image_info":{"orientation":1,"format":"JPEG","height":1162,"width":800,"geo_location":null,"datetime_original":null,"dpi":[72,72]},"datetime_stored":"2017-11-05T09:23:08.824767Z","mime_type":"image/jpeg","is_ready":true,"url":"https://api.uploadcare.com/files/0b37b745-6637-49a1-9c00-3d8281a383e3/","original_filename":"view2.jpg","datetime_uploaded":"2017-11-05T09:22:58.509252Z","size":255570,"is_image":true,"datetime_removed":null,"source":null,"variations":null,"default_effects":""},{"uuid":"f839e2df-ddf8-4c10-9e7d-5a0777eddc93","original_file_url":"https://ucarecdn.com/f839e2df-ddf8-4c10-9e7d-5a0777eddc93/view.png","image_info":{"orientation":null,"format":"PNG","height":600,"width":800,"geo_location":null,"datetime_original":null,"dpi":null},"datetime_stored":"2017-11-05T09:23:08.861737Z","mime_type":"image/png","is_ready":true,"url":"https://api.uploadcare.com/files/f839e2df-ddf8-4c10-9e7d-5a0777eddc93/","original_filename":"view.png","datetime_uploaded":"2017-11-05T09:22:58.526374Z","size":2785,"is_image":true,"datetime_removed":null,"source":null,"variations":null,"default_effects":""}]}'
|
105
|
-
http_version:
|
106
|
-
recorded_at: Sun, 05 Nov 2017 09:23:11 GMT
|
107
|
-
- request:
|
108
|
-
method: get
|
109
|
-
uri: https://api.uploadcare.com/groups/73e3cdbc-6495-4cf2-bbd1-413e6cb70004~2/
|
110
|
-
body:
|
111
|
-
encoding: US-ASCII
|
112
|
-
string: ''
|
113
|
-
headers:
|
114
|
-
Accept:
|
115
|
-
- application/vnd.uploadcare-v0.3+json
|
116
|
-
User-Agent:
|
117
|
-
- UploadcareRuby/1.2.1/demopublickey (Ruby/2.3.1.112; Rails/5.2.0; UploadcareRails/1.2.0-alpha)
|
118
|
-
Date:
|
119
|
-
- Fri, 25 May 2018 07:14:45 -0000
|
120
|
-
Authorization:
|
121
|
-
- Uploadcare demopublickey:efdc230760a97eeffdc78c96fc7507eb1e58b625
|
122
|
-
Accept-Encoding:
|
123
|
-
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
124
|
-
response:
|
125
|
-
status:
|
126
|
-
code: 200
|
127
|
-
message: OK
|
128
|
-
headers:
|
129
|
-
Date:
|
130
|
-
- Fri, 25 May 2018 07:14:46 GMT
|
131
|
-
Content-Type:
|
132
|
-
- application/vnd.uploadcare-v0.3+json
|
133
|
-
Content-Length:
|
134
|
-
- '1536'
|
135
|
-
Connection:
|
136
|
-
- keep-alive
|
137
|
-
Server:
|
138
|
-
- nginx
|
139
|
-
X-Xss-Protection:
|
140
|
-
- 1; mode=block
|
141
|
-
X-Content-Type-Options:
|
142
|
-
- nosniff
|
143
|
-
Vary:
|
144
|
-
- Accept
|
145
|
-
Warning:
|
146
|
-
- '199 Miscellaneous warning: You are using the demo account; Please use API
|
147
|
-
version 0.5, not 0.3'
|
148
|
-
Allow:
|
149
|
-
- GET, HEAD, OPTIONS
|
150
|
-
Access-Control-Allow-Origin:
|
151
|
-
- https://uploadcare.com
|
152
|
-
X-Frame-Options:
|
153
|
-
- SAMEORIGIN
|
154
|
-
body:
|
155
|
-
encoding: UTF-8
|
156
|
-
string: '{"id":"73e3cdbc-6495-4cf2-bbd1-413e6cb70004~2","datetime_created":"2018-05-25T07:13:58.345080Z","datetime_stored":"2018-05-25T07:14:44.293014Z","files_count":2,"cdn_url":"https://ucarecdn.com/73e3cdbc-6495-4cf2-bbd1-413e6cb70004~2/","url":"https://api.uploadcare.com/groups/73e3cdbc-6495-4cf2-bbd1-413e6cb70004~2/","files":[{"datetime_removed":null,"datetime_stored":"2018-05-25T07:14:43.631573Z","datetime_uploaded":"2018-05-25T07:13:56.295620Z","image_info":{"orientation":1,"format":"JPEG","height":1162,"width":800,"geo_location":null,"datetime_original":null,"dpi":[72,72]},"is_image":true,"is_ready":true,"mime_type":"image/jpeg","original_file_url":"https://ucarecdn.com/dbda04e6-c45c-454e-8e6d-443e2c92e781/view2.jpg","original_filename":"view2.jpg","size":255570,"url":"https://api.uploadcare.com/files/dbda04e6-c45c-454e-8e6d-443e2c92e781/","uuid":"dbda04e6-c45c-454e-8e6d-443e2c92e781","source":null,"default_effects":""},{"datetime_removed":null,"datetime_stored":"2018-05-25T07:14:44.261201Z","datetime_uploaded":"2018-05-25T07:13:56.319714Z","image_info":{"orientation":null,"format":"PNG","height":600,"width":800,"geo_location":null,"datetime_original":null,"dpi":null},"is_image":true,"is_ready":true,"mime_type":"image/png","original_file_url":"https://ucarecdn.com/d684a061-1bce-49cc-ab60-f60650246516/view.png","original_filename":"view.png","size":2785,"url":"https://api.uploadcare.com/files/d684a061-1bce-49cc-ab60-f60650246516/","uuid":"d684a061-1bce-49cc-ab60-f60650246516","source":null,"default_effects":""}]}'
|
157
|
-
http_version:
|
158
|
-
recorded_at: Fri, 25 May 2018 07:14:46 GMT
|
159
|
-
- request:
|
160
|
-
method: get
|
161
|
-
uri: https://api.uploadcare.com/groups/c50e9a53-0b95-48ac-a4a9-6744052dbdab~2/
|
162
|
-
body:
|
163
|
-
encoding: US-ASCII
|
164
|
-
string: ''
|
165
|
-
headers:
|
166
|
-
Accept:
|
167
|
-
- application/vnd.uploadcare-v0.3+json
|
168
|
-
User-Agent:
|
169
|
-
- uploadcare-ruby/2.3.1.112/1.1.0/demopublickey
|
170
|
-
Date:
|
171
|
-
- Fri, 25 May 2018 09:12:13 -0000
|
172
|
-
Authorization:
|
173
|
-
- Uploadcare demopublickey:632d016b78d11080d93ef9af8b46af170918715a
|
174
|
-
Accept-Encoding:
|
175
|
-
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
176
|
-
response:
|
177
|
-
status:
|
178
|
-
code: 200
|
179
|
-
message: OK
|
180
|
-
headers:
|
181
|
-
Date:
|
182
|
-
- Fri, 25 May 2018 09:12:15 GMT
|
183
|
-
Content-Type:
|
184
|
-
- application/vnd.uploadcare-v0.3+json
|
185
|
-
Content-Length:
|
186
|
-
- '1536'
|
187
|
-
Connection:
|
188
|
-
- keep-alive
|
189
|
-
Server:
|
190
|
-
- nginx
|
191
|
-
X-Xss-Protection:
|
192
|
-
- 1; mode=block
|
193
|
-
X-Content-Type-Options:
|
194
|
-
- nosniff
|
195
|
-
Vary:
|
196
|
-
- Accept
|
197
|
-
Warning:
|
198
|
-
- '199 Miscellaneous warning: You are using the demo account; Please use API
|
199
|
-
version 0.5, not 0.3'
|
200
|
-
Allow:
|
201
|
-
- GET, HEAD, OPTIONS
|
202
|
-
Access-Control-Allow-Origin:
|
203
|
-
- https://uploadcare.com
|
204
|
-
X-Frame-Options:
|
205
|
-
- SAMEORIGIN
|
206
|
-
body:
|
207
|
-
encoding: UTF-8
|
208
|
-
string: '{"id":"c50e9a53-0b95-48ac-a4a9-6744052dbdab~2","datetime_created":"2018-05-25T09:11:57.237165Z","datetime_stored":"2018-05-25T09:12:13.960290Z","files_count":2,"cdn_url":"https://ucarecdn.com/c50e9a53-0b95-48ac-a4a9-6744052dbdab~2/","url":"https://api.uploadcare.com/groups/c50e9a53-0b95-48ac-a4a9-6744052dbdab~2/","files":[{"datetime_removed":null,"datetime_stored":"2018-05-25T09:12:13.881956Z","datetime_uploaded":"2018-05-25T09:11:56.464753Z","image_info":{"orientation":1,"format":"JPEG","height":1162,"width":800,"geo_location":null,"datetime_original":null,"dpi":[72,72]},"is_image":true,"is_ready":true,"mime_type":"image/jpeg","original_file_url":"https://ucarecdn.com/81144776-fbd9-4c5f-887b-a5404da1fb71/view2.jpg","original_filename":"view2.jpg","size":255570,"url":"https://api.uploadcare.com/files/81144776-fbd9-4c5f-887b-a5404da1fb71/","uuid":"81144776-fbd9-4c5f-887b-a5404da1fb71","source":null,"default_effects":""},{"datetime_removed":null,"datetime_stored":"2018-05-25T09:12:13.911791Z","datetime_uploaded":"2018-05-25T09:11:56.488947Z","image_info":{"orientation":null,"format":"PNG","height":600,"width":800,"geo_location":null,"datetime_original":null,"dpi":null},"is_image":true,"is_ready":true,"mime_type":"image/png","original_file_url":"https://ucarecdn.com/f40b1430-c576-42d5-b2ab-3c1fc39ee356/view.png","original_filename":"view.png","size":2785,"url":"https://api.uploadcare.com/files/f40b1430-c576-42d5-b2ab-3c1fc39ee356/","uuid":"f40b1430-c576-42d5-b2ab-3c1fc39ee356","source":null,"default_effects":""}]}'
|
209
|
-
http_version:
|
210
|
-
recorded_at: Fri, 25 May 2018 09:12:14 GMT
|
211
|
-
- request:
|
212
|
-
method: get
|
213
|
-
uri: https://api.uploadcare.com/groups/19073296-2315-4726-817b-46398b2c7431~2/
|
214
|
-
body:
|
215
|
-
encoding: US-ASCII
|
216
|
-
string: ''
|
217
|
-
headers:
|
218
|
-
Accept:
|
219
|
-
- application/vnd.uploadcare-v0.3+json
|
220
|
-
User-Agent:
|
221
|
-
- UploadcareRuby/1.2.1/demopublickey (Ruby/2.3.1.112; Rails/5.2.0; UploadcareRails/1.2.0-alpha2)
|
222
|
-
Date:
|
223
|
-
- Mon, 28 May 2018 19:05:28 -0000
|
224
|
-
Authorization:
|
225
|
-
- Uploadcare demopublickey:ef119e40ef0462d15d889daba0fa992d4ee17f7a
|
226
|
-
Accept-Encoding:
|
227
|
-
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
228
|
-
response:
|
229
|
-
status:
|
230
|
-
code: 200
|
231
|
-
message: OK
|
232
|
-
headers:
|
233
|
-
Date:
|
234
|
-
- Mon, 28 May 2018 19:05:29 GMT
|
235
|
-
Content-Type:
|
236
|
-
- application/vnd.uploadcare-v0.3+json
|
237
|
-
Content-Length:
|
238
|
-
- '1536'
|
239
|
-
Connection:
|
240
|
-
- keep-alive
|
241
|
-
Server:
|
242
|
-
- nginx
|
243
|
-
X-Xss-Protection:
|
244
|
-
- 1; mode=block
|
245
|
-
X-Content-Type-Options:
|
246
|
-
- nosniff
|
247
|
-
Vary:
|
248
|
-
- Accept
|
249
|
-
Warning:
|
250
|
-
- '199 Miscellaneous warning: You are using the demo account; Please use API
|
251
|
-
version 0.5, not 0.3'
|
252
|
-
Allow:
|
253
|
-
- GET, HEAD, OPTIONS
|
254
|
-
Access-Control-Allow-Origin:
|
255
|
-
- https://uploadcare.com
|
256
|
-
X-Frame-Options:
|
257
|
-
- SAMEORIGIN
|
258
|
-
body:
|
259
|
-
encoding: UTF-8
|
260
|
-
string: '{"id":"19073296-2315-4726-817b-46398b2c7431~2","datetime_created":"2018-05-28T19:05:04.518599Z","datetime_stored":"2018-05-28T19:05:25.719275Z","files_count":2,"cdn_url":"https://ucarecdn.com/19073296-2315-4726-817b-46398b2c7431~2/","url":"https://api.uploadcare.com/groups/19073296-2315-4726-817b-46398b2c7431~2/","files":[{"datetime_removed":null,"datetime_stored":"2018-05-28T19:05:25.637792Z","datetime_uploaded":"2018-05-28T19:05:02.297907Z","image_info":{"orientation":1,"format":"JPEG","height":1162,"width":800,"geo_location":null,"datetime_original":null,"dpi":[72,72]},"is_image":true,"is_ready":true,"mime_type":"image/jpeg","original_file_url":"https://ucarecdn.com/42627fa0-e88e-4055-b8ed-98e6a9500737/view2.jpg","original_filename":"view2.jpg","size":255570,"url":"https://api.uploadcare.com/files/42627fa0-e88e-4055-b8ed-98e6a9500737/","uuid":"42627fa0-e88e-4055-b8ed-98e6a9500737","source":null,"default_effects":""},{"datetime_removed":null,"datetime_stored":"2018-05-28T19:05:25.693326Z","datetime_uploaded":"2018-05-28T19:05:02.352341Z","image_info":{"orientation":null,"format":"PNG","height":600,"width":800,"geo_location":null,"datetime_original":null,"dpi":null},"is_image":true,"is_ready":true,"mime_type":"image/png","original_file_url":"https://ucarecdn.com/1ee9aaa7-2aba-4700-9aa5-ce88cf95085b/view.png","original_filename":"view.png","size":2785,"url":"https://api.uploadcare.com/files/1ee9aaa7-2aba-4700-9aa5-ce88cf95085b/","uuid":"1ee9aaa7-2aba-4700-9aa5-ce88cf95085b","source":null,"default_effects":""}]}'
|
261
|
-
http_version:
|
262
|
-
recorded_at: Mon, 28 May 2018 19:05:29 GMT
|
263
|
-
recorded_with: VCR 4.0.0
|
data/spec/dummy/README.rdoc
DELETED
@@ -1,28 +0,0 @@
|
|
1
|
-
== README
|
2
|
-
|
3
|
-
This README would normally document whatever steps are necessary to get the
|
4
|
-
application up and running.
|
5
|
-
|
6
|
-
Things you may want to cover:
|
7
|
-
|
8
|
-
* Ruby version
|
9
|
-
|
10
|
-
* System dependencies
|
11
|
-
|
12
|
-
* Configuration
|
13
|
-
|
14
|
-
* Database creation
|
15
|
-
|
16
|
-
* Database initialization
|
17
|
-
|
18
|
-
* How to run the test suite
|
19
|
-
|
20
|
-
* Services (job queues, cache servers, search engines, etc.)
|
21
|
-
|
22
|
-
* Deployment instructions
|
23
|
-
|
24
|
-
* ...
|
25
|
-
|
26
|
-
|
27
|
-
Please feel free to use a different markup language if you do not plan to run
|
28
|
-
<tt>rake doc:app</tt>.
|
data/spec/dummy/Rakefile
DELETED
@@ -1,13 +0,0 @@
|
|
1
|
-
// This is a manifest file that'll be compiled into application.js, which will include all the files
|
2
|
-
// listed below.
|
3
|
-
//
|
4
|
-
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
|
5
|
-
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
|
6
|
-
//
|
7
|
-
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
|
8
|
-
// compiled file.
|
9
|
-
//
|
10
|
-
// Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details
|
11
|
-
// about supported directives.
|
12
|
-
//
|
13
|
-
//= require_tree .
|
@@ -1,13 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
* This is a manifest file that'll be compiled into application.css, which will include all the files
|
3
|
-
* listed below.
|
4
|
-
*
|
5
|
-
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
|
6
|
-
* or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
|
7
|
-
*
|
8
|
-
* You're free to add application-wide styles to this file and they'll appear at the top of the
|
9
|
-
* compiled file, but it's generally better to create a new file per style scope.
|
10
|
-
*
|
11
|
-
*= require_self
|
12
|
-
*= require_tree .
|
13
|
-
*/
|
@@ -1,56 +0,0 @@
|
|
1
|
-
body { background-color: #fff; color: #333; }
|
2
|
-
|
3
|
-
body, p, ol, ul, td {
|
4
|
-
font-family: verdana, arial, helvetica, sans-serif;
|
5
|
-
font-size: 13px;
|
6
|
-
line-height: 18px;
|
7
|
-
}
|
8
|
-
|
9
|
-
pre {
|
10
|
-
background-color: #eee;
|
11
|
-
padding: 10px;
|
12
|
-
font-size: 11px;
|
13
|
-
}
|
14
|
-
|
15
|
-
a { color: #000; }
|
16
|
-
a:visited { color: #666; }
|
17
|
-
a:hover { color: #fff; background-color:#000; }
|
18
|
-
|
19
|
-
div.field, div.actions {
|
20
|
-
margin-bottom: 10px;
|
21
|
-
}
|
22
|
-
|
23
|
-
#notice {
|
24
|
-
color: green;
|
25
|
-
}
|
26
|
-
|
27
|
-
.field_with_errors {
|
28
|
-
padding: 2px;
|
29
|
-
background-color: red;
|
30
|
-
display: table;
|
31
|
-
}
|
32
|
-
|
33
|
-
#error_explanation {
|
34
|
-
width: 450px;
|
35
|
-
border: 2px solid red;
|
36
|
-
padding: 7px;
|
37
|
-
padding-bottom: 0;
|
38
|
-
margin-bottom: 20px;
|
39
|
-
background-color: #f0f0f0;
|
40
|
-
}
|
41
|
-
|
42
|
-
#error_explanation h2 {
|
43
|
-
text-align: left;
|
44
|
-
font-weight: bold;
|
45
|
-
padding: 5px 5px 5px 15px;
|
46
|
-
font-size: 12px;
|
47
|
-
margin: -7px;
|
48
|
-
margin-bottom: 0px;
|
49
|
-
background-color: #c00;
|
50
|
-
color: #fff;
|
51
|
-
}
|
52
|
-
|
53
|
-
#error_explanation ul li {
|
54
|
-
font-size: 12px;
|
55
|
-
list-style: square;
|
56
|
-
}
|
@@ -1,58 +0,0 @@
|
|
1
|
-
class PostWithCollectionsController < ApplicationController
|
2
|
-
before_action :set_post_with_collection, only: [:show, :edit, :update, :destroy]
|
3
|
-
|
4
|
-
# GET /post_with_collections
|
5
|
-
def index
|
6
|
-
@post_with_collections = PostWithCollection.all
|
7
|
-
end
|
8
|
-
|
9
|
-
# GET /post_with_collections/1
|
10
|
-
def show
|
11
|
-
end
|
12
|
-
|
13
|
-
# GET /post_with_collections/new
|
14
|
-
def new
|
15
|
-
@post_with_collection = PostWithCollection.new
|
16
|
-
end
|
17
|
-
|
18
|
-
# GET /post_with_collections/1/edit
|
19
|
-
def edit
|
20
|
-
end
|
21
|
-
|
22
|
-
# POST /post_with_collections
|
23
|
-
def create
|
24
|
-
@post_with_collection = PostWithCollection.new(post_with_collection_params)
|
25
|
-
|
26
|
-
if @post_with_collection.save
|
27
|
-
redirect_to @post_with_collection, notice: 'Post with collection was successfully created.'
|
28
|
-
else
|
29
|
-
render action: 'new'
|
30
|
-
end
|
31
|
-
end
|
32
|
-
|
33
|
-
# PATCH/PUT /post_with_collections/1
|
34
|
-
def update
|
35
|
-
if @post_with_collection.update(post_with_collection_params)
|
36
|
-
redirect_to @post_with_collection, notice: 'Post with collection was successfully updated.'
|
37
|
-
else
|
38
|
-
render action: 'edit'
|
39
|
-
end
|
40
|
-
end
|
41
|
-
|
42
|
-
# DELETE /post_with_collections/1
|
43
|
-
def destroy
|
44
|
-
@post_with_collection.destroy
|
45
|
-
redirect_to post_with_collections_url, notice: 'Post with collection was successfully destroyed.'
|
46
|
-
end
|
47
|
-
|
48
|
-
private
|
49
|
-
# Use callbacks to share common setup or constraints between actions.
|
50
|
-
def set_post_with_collection
|
51
|
-
@post_with_collection = PostWithCollection.find(params[:id])
|
52
|
-
end
|
53
|
-
|
54
|
-
# Only allow a trusted parameter "white list" through.
|
55
|
-
def post_with_collection_params
|
56
|
-
params.require(:post_with_collection).permit(:title, :file)
|
57
|
-
end
|
58
|
-
end
|
@@ -1,58 +0,0 @@
|
|
1
|
-
class PostsController < ApplicationController
|
2
|
-
before_action :set_post, only: [:show, :edit, :update, :destroy]
|
3
|
-
|
4
|
-
# GET /posts
|
5
|
-
def index
|
6
|
-
@posts = Post.all
|
7
|
-
end
|
8
|
-
|
9
|
-
# GET /posts/1
|
10
|
-
def show
|
11
|
-
end
|
12
|
-
|
13
|
-
# GET /posts/new
|
14
|
-
def new
|
15
|
-
@post = Post.new
|
16
|
-
end
|
17
|
-
|
18
|
-
# GET /posts/1/edit
|
19
|
-
def edit
|
20
|
-
end
|
21
|
-
|
22
|
-
# POST /posts
|
23
|
-
def create
|
24
|
-
@post = Post.new(post_params)
|
25
|
-
|
26
|
-
if @post.save
|
27
|
-
redirect_to @post, notice: 'Post was successfully created.'
|
28
|
-
else
|
29
|
-
render action: 'new'
|
30
|
-
end
|
31
|
-
end
|
32
|
-
|
33
|
-
# PATCH/PUT /posts/1
|
34
|
-
def update
|
35
|
-
if @post.update(post_params)
|
36
|
-
redirect_to @post, notice: 'Post was successfully updated.'
|
37
|
-
else
|
38
|
-
render action: 'edit'
|
39
|
-
end
|
40
|
-
end
|
41
|
-
|
42
|
-
# DELETE /posts/1
|
43
|
-
def destroy
|
44
|
-
@post.destroy
|
45
|
-
redirect_to posts_url, notice: 'Post was successfully destroyed.'
|
46
|
-
end
|
47
|
-
|
48
|
-
private
|
49
|
-
# Use callbacks to share common setup or constraints between actions.
|
50
|
-
def set_post
|
51
|
-
@post = Post.find(params[:id])
|
52
|
-
end
|
53
|
-
|
54
|
-
# Only allow a trusted parameter "white list" through.
|
55
|
-
def post_params
|
56
|
-
params.require(:post).permit(:title, :file)
|
57
|
-
end
|
58
|
-
end
|
@@ -1,58 +0,0 @@
|
|
1
|
-
class PostsWithCollectionAndFilesController < ApplicationController
|
2
|
-
before_action :set_posts_with_collection_and_file, only: [:show, :edit, :update, :destroy]
|
3
|
-
|
4
|
-
# GET /posts_with_collection_and_files
|
5
|
-
def index
|
6
|
-
@posts_with_collection_and_files = PostsWithCollectionAndFile.all
|
7
|
-
end
|
8
|
-
|
9
|
-
# GET /posts_with_collection_and_files/1
|
10
|
-
def show
|
11
|
-
end
|
12
|
-
|
13
|
-
# GET /posts_with_collection_and_files/new
|
14
|
-
def new
|
15
|
-
@posts_with_collection_and_file = PostsWithCollectionAndFile.new
|
16
|
-
end
|
17
|
-
|
18
|
-
# GET /posts_with_collection_and_files/1/edit
|
19
|
-
def edit
|
20
|
-
end
|
21
|
-
|
22
|
-
# POST /posts_with_collection_and_files
|
23
|
-
def create
|
24
|
-
@posts_with_collection_and_file = PostsWithCollectionAndFile.new(posts_with_collection_and_file_params)
|
25
|
-
|
26
|
-
if @posts_with_collection_and_file.save
|
27
|
-
redirect_to @posts_with_collection_and_file, notice: 'Posts with collection and file was successfully created.'
|
28
|
-
else
|
29
|
-
render action: 'new'
|
30
|
-
end
|
31
|
-
end
|
32
|
-
|
33
|
-
# PATCH/PUT /posts_with_collection_and_files/1
|
34
|
-
def update
|
35
|
-
if @posts_with_collection_and_file.update(posts_with_collection_and_file_params)
|
36
|
-
redirect_to @posts_with_collection_and_file, notice: 'Posts with collection and file was successfully updated.'
|
37
|
-
else
|
38
|
-
render action: 'edit'
|
39
|
-
end
|
40
|
-
end
|
41
|
-
|
42
|
-
# DELETE /posts_with_collection_and_files/1
|
43
|
-
def destroy
|
44
|
-
@posts_with_collection_and_file.destroy
|
45
|
-
redirect_to posts_with_collection_and_files_url, notice: 'Posts with collection and file was successfully destroyed.'
|
46
|
-
end
|
47
|
-
|
48
|
-
private
|
49
|
-
# Use callbacks to share common setup or constraints between actions.
|
50
|
-
def set_posts_with_collection_and_file
|
51
|
-
@posts_with_collection_and_file = PostsWithCollectionAndFile.find(params[:id])
|
52
|
-
end
|
53
|
-
|
54
|
-
# Only allow a trusted parameter "white list" through.
|
55
|
-
def posts_with_collection_and_file_params
|
56
|
-
params[:posts_with_collection_and_file]
|
57
|
-
end
|
58
|
-
end
|
@@ -1,16 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
<html>
|
3
|
-
<head>
|
4
|
-
<title>Dummy</title>
|
5
|
-
<%= stylesheet_link_tag :application, media: 'all', 'data-turbolinks-track' => true %>
|
6
|
-
<%= javascript_include_tag :application, 'data-turbolinks-track' => true %>
|
7
|
-
<%= csrf_meta_tags %>
|
8
|
-
<%= include_uploadcare_widget_from_cdn %>
|
9
|
-
<%= uploadcare_settings %>
|
10
|
-
</head>
|
11
|
-
<body>
|
12
|
-
|
13
|
-
<%= yield %>
|
14
|
-
|
15
|
-
</body>
|
16
|
-
</html>
|