Skip to content

Commit

Permalink
fix depracation warnings form SimpleForm - ref: heartcombo/simple_for…
Browse files Browse the repository at this point in the history
  • Loading branch information
Andy Olliver authored and eturino committed Jun 22, 2015
1 parent 4c4aa0d commit a06d4ef
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion app/inputs/attachments_input.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
class AttachmentsInput < SimpleForm::Inputs::Base

def input
def input(wrapper_options)
definitions = Cms::Attachment.definitions_for(object.class.name, :multiple)
if definitions.empty?
template.render(partial: 'cms/attachments/no_attachments_defined', locals: {object: object})
Expand Down
2 changes: 1 addition & 1 deletion app/inputs/cms_text_area_input.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
class CmsTextAreaInput < SimpleForm::Inputs::TextInput

include Cms::FormBuilder::DefaultInput
def input
def input(wrapper_options)
extract_default
@builder.text_area(attribute_name, input_html_options).html_safe
end
Expand Down
2 changes: 1 addition & 1 deletion app/inputs/date_picker_input.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# 1. Allows for empty dates (i.e. no date)
class DatePickerInput < SimpleForm::Inputs::TextInput

def input
def input(wrapper_options)
@builder.text_field(attribute_name, input_html_options).html_safe
end
end
2 changes: 1 addition & 1 deletion app/inputs/file_picker_input.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# @option options [String] :hint (blank) Helpful tips for the person entering the field, appears blank if nothing is specified.
class FilePickerInput < SimpleForm::Inputs::Base

def input
def input(wrapper_options)
# New blocks will not have their attachments created yet.
object.ensure_attachment_exists if object.respond_to?(:ensure_attachment_exists)

Expand Down
2 changes: 1 addition & 1 deletion app/inputs/name_input.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def initialize(*args)
options[:placeholder] = "Name" if options[:placeholder].nil?
end

def input
def input(wrapper_options)
add_slug_source_for_content_that_needs_it

unless options[:label]
Expand Down
2 changes: 1 addition & 1 deletion app/inputs/path_input.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
class PathInput < SimpleForm::Inputs::TextInput

def input
def input(wrapper_options)
if forecasting_a_new_section?
options[:hint] = "Forecast: Saving this first #{object.class.display_name} will create a new section at #{object.class.path}."
end
Expand Down
2 changes: 1 addition & 1 deletion app/inputs/template_editor_input.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ def label
super if render_template_input?
end

def input
def input(wrapper_options)
if render_template_input?
options[:default] = object.class.default_template
options[:default_handler] = "erb" unless options[:default_handler]
Expand Down
2 changes: 1 addition & 1 deletion app/inputs/text_editor_input.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
class TextEditorInput < SimpleForm::Inputs::TextInput

def input
def input(wrapper_options)
tag_id = "#{object_name}_#{attribute_name}"
s = template.select_tag(:dhtml_selector,
template.options_for_select([["Rich Text", ""],["Simple Text", "disabled"]],
Expand Down

0 comments on commit a06d4ef

Please sign in to comment.