Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

при сохранении картинки сохраняем ее ширину и высоту в бд #28

Merged
merged 2 commits into from Sep 29, 2020

Conversation

natt-eyre
Copy link
Contributor

No description provided.

@@ -136,6 +143,10 @@ def assign uploaded_file
instance_write(:content_type, uploaded_file.content_type.to_s.strip)
instance_write(:file_size, uploaded_file.size.to_i)
instance_write(:updated_at, Time.now)
if sizes
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

давай сразу проверим что в sizes[0] и sizes[1] есть что-то и в валидаторе

@natt-eyre natt-eyre merged commit 2e8f0f5 into master Sep 29, 2020
@natt-eyre natt-eyre deleted the save-image-sizes branch September 29, 2020 14:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants