app/helpers/redditor/application_helper.rb in redditor-0.1.14 vs app/helpers/redditor/application_helper.rb in redditor-0.1.15
- old
+ new
@@ -11,18 +11,16 @@
end
def redditor_form(f, &block)
id = "#{real_name(f.object)}_"
id += f.object.id.nil? ? "#{f.object.object_id}" : "#{f.object.id}"
- if f.object.object_id.present?
- f.object_name.sub!(/\[\d*\]/, "[#{f.object.object_id}]")
- end
+ f.object_name.sub!(/\[\d*\]/, "[#{f.object.object_id}]") if f.object.object_id.present?
index = if f.object.object_id.present?
f.object.object_id
else
f.index
end
- data = {'object-name' => f.object_name, 'object-id' => index}
+ data = { 'object-name' => f.object_name, 'object-id' => index }
content_tag(:div, capture(&block), class: 'redditor__form', id: id, data: data)
end
def redditor_slider_block_kind f, slider_block
if @content_block