Coder Social home page Coder Social logo

paperclip-globalize3's People

Contributors

marselshiriyazdanov avatar mcrip avatar mherold avatar pauldub avatar swelther avatar vitaliyadamkov avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

paperclip-globalize3's Issues

Improve how translated attachments are declared

(moving the random ideas from the "Future Plans" section in the README to here:)

  • Make it easier to specify translated attachments, e.g. using one of these options:
    • support translates :attachment_name
    • support :translated option for has_attached_file or use something like has_translated_attached_file instead
    • eliminate the need to specify; automatically set translates as soon as the :locale interpolation is used
  • Don't depend on order of definition for it to work (translates after has_attached_file)

Support globalize 5.0.x

The gem has a dependency on globalize (~> 4.0.0), will it be made to support version 5.0.x?

Locale gets lost when assign multiple and save afterwards

Hi,

when I assign multiple files with different languages and save afterwards, the locale gets lost during the save:

I18n.with_locale(:de) do
  model.file = translation[:file]
end

I18n.with_locale(:it) do
  model.file = translation[:file]
end

I18n.with_locale(:fr) do
  model.file = translation[:file]
end

model.save!

The model is saved successfully, but the there is only one file on my filesystem
because the Attachment object is always the same one.
It's the Attachment for the default locale.

Is it possible to assign multiple translated files and simply save once?
If not I could create a pull request if you are fine with the behaviour.

Best regards

What needs to be done for paperclip 3.x integration?

Greetings there,

Can you give me an idea what would be needed for paperclip 3.x integration? I need translated attachments for a system I work on that uses paperclip 3, and I'd consider doing the integration.

Drop support for paperclip < 5.3.0

I'm thinking after #15 is merged we should also drop support for old paperclip versions < 5.3.0. Lower versions will have deprecation warnings in ruby 2.4+.

(In that case, some conditional code in attachment.rb as well as some of the Appraisals/gemfiles could be removed.)

(:integer), should be :string or :text

Following: "Migrate the paperclip columns ('xxx_file_name' etc.) of the attachment to the translation table"

Hi, here's my migration:

Frame::Contribution.add_translation_fields!({exp1_photo_file_name: :string})
Frame::Contribution.add_translation_fields!({exp1_photo_content_type: :string})
Frame::Contribution.add_translation_fields!({exp1_photo_file_size: :integer})
Frame::Contribution.add_translation_fields!({exp1_photo_updated_at: :timestamp})

What am I missing?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.