Skip to content

Rails 4.2, Formtastic 3 #190

@gwincr11

Description

@gwincr11

Hello,

I have been playing around with getting Rich to work with Formtastic 3 and Rails 4.2

I have discovered that it mostly works, the only thing that is preventing it from working is that the Rails actionview helper that creates the field, when using paperclip, tries to use the Paperclip object instance as the value for the field. When you pass in the field value with the input_html setting everything works.

It may be good to setup some defaults to handle this situation and pass in the value of the field automatically. Here is the settings that seem to work.

 <% p.input :photo, :as => :rich_picker,
        config: {
        :hidden_input => true,
        :placeholder_image => "",
        :scoped => "image"
      },
      input_html: {
        value: p.object.photo.url
      }
      %>

Any thoughts on this, I think that it would be relatively easy to collect this value and pass it to the builder, we may just need to have adapters for each supported image uploader to make up for differences between carrierwave and paperclip.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions