mirror of
https://github.com/astuto/astuto.git
synced 2025-12-16 11:47:56 +01:00
fix attachment validation for o_auth and post entities
This commit is contained in:
@@ -19,6 +19,9 @@ class OAuth < ApplicationRecord
|
||||
validates :profile_url, presence: true
|
||||
validates :scope, presence: true
|
||||
validates :json_user_email_path, presence: true
|
||||
validates :logo,
|
||||
content_type: Rails.application.accepted_image_types,
|
||||
size: { less_than: 64.kilobytes }
|
||||
|
||||
friendly_id :generate_random_slug, use: :scoped, scope: :tenant_id
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ class Post < ApplicationRecord
|
||||
validates :title, presence: true, length: { in: 4..128 }
|
||||
validates :attachments,
|
||||
content_type: Rails.application.accepted_image_types,
|
||||
size: { less_than: 256.kilobytes },
|
||||
size: { less_than: 2048.kilobytes },
|
||||
limit: { max: 5 }
|
||||
|
||||
paginates_per Rails.application.posts_per_page
|
||||
|
||||
Reference in New Issue
Block a user