Skip to content

Commit

Permalink
Fix a SimpleForm 3.1.0 deprecation warning
Browse files Browse the repository at this point in the history
DEPRECATION WARNING: input method now accepts a `wrapper_options` argument. The method definition without the argument is deprecated and will be removed in the next Simple Form version. Change your code from:

    def input

to

    def input(wrapper_options)

See heartcombo/simple_form#997 for more information.
 (called from block in _app_views_tips_new_html_haml__844955797404246493_70326972009780 at /Users/dimitar/projects/fmi/evans/app/views/tips/new.html.haml:6)
  • Loading branch information
mitio committed Aug 28, 2015
1 parent eac4bb8 commit 55b3bc7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/inputs/date_time_input.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
class DateTimeInput < SimpleForm::Inputs::Base
FORMAT = '%Y-%m-%d %H:%M:%S'

def input
def input(wrapper_options)
timestamp = @builder.object.send(attribute_name)
formatted = timestamp.try(:strftime, FORMAT)

Expand Down
2 changes: 1 addition & 1 deletion app/inputs/markdown_input.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
class MarkdownInput < SimpleForm::Inputs::TextInput
def input
def input(wrapper_options)
content = @builder.object.send(attribute_name) || ''
input_html_options['data-contribution-input'] = true

Expand Down

0 comments on commit 55b3bc7

Please sign in to comment.