Skip to content
Browse files

Cleanup

  • Loading branch information...
1 parent 3da7a92 commit a74c129e16df1342b7d813c5c879465ebe022c59 @bogdan committed
Showing with 9 additions and 9 deletions.
  1. +9 −9 lib/datagrid/form_builder.rb
View
18 lib/datagrid/form_builder.rb
@@ -110,15 +110,15 @@ def datagrid_range_filter_options(object, filter, type, options)
options[:value] = filter.format(object[filter.name].try(type_method_map[type]))
# In case of datagrid ranged filter
# from and to input will have same id
- options[:id] = if !options.key?(:id)
- # Rails provides it's own default id for all inputs
- # In order to prevent that we assign no id by default
- options[:id] = nil
- elsif options[:id].present?
- # If the id was given we prefix it
- # with from_ and to_ accordingly
- options[:id] = [type, options[:id]].join("_")
- end
+ if !options.key?(:id)
+ # Rails provides it's own default id for all inputs
+ # In order to prevent that we assign no id by default
+ options[:id] = nil
+ elsif options[:id].present?
+ # If the id was given we prefix it
+ # with from_ and to_ accordingly
+ options[:id] = [type, options[:id]].join("_")
+ end
options
end

0 comments on commit a74c129

Please sign in to comment.
Something went wrong with that request. Please try again.