ruby on rails - undefined method merge_wrapper_options -


I'm trying to use fake input for simple documentation here:.

  F.input: address, as: fake   

However, I get the 'option' merge_image option for # # This error is found even after restarting the area.

Please help me fix it.

Thanks.

Overview

example method merge_wrapper_options to SimpleForm :: Inputs :: Base class , But not until version 3.1.0.rc1

Here is the relevant source code for version 3.0.2 (no merge_wrapper_options ):

version 3.1.0.rc1 Contrast this with:

So if you are in v3.0.2 or earlier, you will not have it. But, no big deal, only the method itself defines to:

code

/app/inputs/fake_string_input.rb

  class FakeStringInput & Lt; SimpleForm :: Inputs :: StringInput # creates an original input without the value def input (wrapper_options = nil) without reading any value merged_input_options = Mrg_waprpriwartn (input_html_options, wrapper_options) template.text_field_tag ​​(attribute_name, nil, merged_input_options) end # method def merge_wrapper_options (option, Wrapper_options) If wrapper_options options.merge (wrapper_options) | _, Older, Newell. If Array === Old Old Old + Array (Naval) End and Other Options End # Method End # Class   

/app/views/some_form.html.haml

  = f.input: some_parameter, label: wrong, like :: fake_string, input_html: {value: strong> post requests Will include the following:   
  parameter: {"utf8" => "One", "some_premeter" = & gt; "Some-value"}    

Comments

Popular posts from this blog

java - ImportError: No module named py4j.java_gateway -

python - Receiving "KeyError" after decoding json result from url -

.net - Creating a new Queue Manager and Queue in Websphere MQ (using C#) -