picandocodigo / administrate-field-paperclip Goto Github PK
View Code? Open in Web Editor NEWPaperclip field plugin for Administrate
Home Page: https://rubygems.org/gems/administrate-field-paperclip
License: MIT License
Paperclip field plugin for Administrate
Home Page: https://rubygems.org/gems/administrate-field-paperclip
License: MIT License
Hello I am trying to use this with my project and one model has an attachment that can be a video or an image, can this be integrated? And if so should I create a PR if I get something working soon?
Thank you
Greetings,
Would you consider relaxing the requirement for Rails < 5.1? I'd like to use this gem with the latest Rails.
Thank you,
--Michael
Hi --
I was about to go add support for deleting an attachment, but not sure what approach makes the most sense.
For any other field type (text/etc), the current value gets rendered to the form and you can edit it out to communicate to the controller that you want to unset it.
For file field types, the current value doesn't really get rendered. We can render the attachment URL or image out of band, but it's not native to the input type. There doesn't appear to be a way to populate the input with an 'unset' type value, so there's no clear way to communicate to the controller in a standard way to unset the attribute.
The best practice appears to be to render a 'delete'/'unset' checkbox or similar, and check for that value in the controller. However, this would require the controller to cooperate with the field's custom checkbox semantics, which breaks the nice abstraction we have with fields in Administrate.
Thoughts?
Ankur
Hey
I know it's edge case (or maybe not), but I have the following structure:
I have an Attachment model, where is :data is the paperclip attachment.
But this model belongs to polimorphically to a concern, called Attachmentable
Attachmentable defines has_many to attachments.
And I have several models, which includes Attachmentable.
So, I need somehow to integrate paperclip to administrate.
Cant use has many, or polymorphic, or paperclip field types.
I need all of them for one field.
There is maybe a solution to use with your gem?
Or can be this a valid feature request?
Thanks
Can the rails dependency go any lower than 5.0? I am looking to use this with rails 4.2.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.