Skip to content

Instantly share code, notes, and snippets.

@glebtv
Created August 2, 2016 09:54
Show Gist options
  • Save glebtv/9185e74a1ae60b23e12ef442c1b4583c to your computer and use it in GitHub Desktop.
Save glebtv/9185e74a1ae60b23e12ef442c1b4583c to your computer and use it in GitHub Desktop.
RocketCMS.patch 'Page' do
model do
has_attached_file :icon
validates_attachment_content_type :icon, content_type: /\Aimage\/.*\Z/
end
edit do
field :icon
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment