Simple_form: No input found for money

Created on 10 May 2018  路  4Comments  路  Source: heartcombo/simple_form

Environment

  • Ruby ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-darwin17]
  • Rails Rails 5.2.0
  • Simple Form simple_form (4.0.0)

Current behavior

I'm using a template called a lot and there are some money type fields

class CreateLots < ActiveRecord::Migration[5.2]
  def change
    create_table :lots do |t|
      t.integer :number_lot
      t.string :title
      t.money :value
      t.money :value_first_squere
      t.money :value_second_square
      t.money :value_increment
      t.integer :modality, default: 0
      t.integer :status, default: 0

      t.timestamps
    end
  end
end

when I render the form is giving the following error: No input found for money

= f.input :value

Were you expecting the simple form rendering normally made up, or am I doing something wrong?

Feature request

Most helpful comment

Get the same issue

@feliperenan Here a sample app :) :

https://github.com/benoitr/money_app

All 4 comments

Hi @frankyston, thank you for the report.

Could you please provide us a sample application that reproduces the issue in isolation?

That would help us find the issue.

Get the same issue

@feliperenan Here a sample app :) :

https://github.com/benoitr/money_app

@feliperenan can this issue be reopened now, that the sample app is available since June of last year?

We decided to not add this support at Simple Form since money field isn't common. You can create a custom input case you still need it.

See more about how to create custom components here:
https://github.com/plataformatec/simple_form#custom-inputs

Thanks for reporting the issue :)

Was this page helpful?
0 / 5 - 0 ratings