Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'master' of git://github.com/ijcd/auto_admin

Conflicts:

	lib/auto_admin_configuration.rb
  • Loading branch information...
commit a6530bca63fe03f3ec6fa5adfedabcffce095e90 2 parents e511315 + 4e6d9bc
@jcnetdev jcnetdev authored
View
2  lib/auto_admin_configuration.rb
@@ -538,7 +538,7 @@ def append_search_condition!(query, options={})
unless query.empty?
conditions = options[:conditions] || []
conditions = [conditions] unless conditions.is_a? Array
- new_condition = '(' + columns_for_search.map { |col| "#{col} LIKE ?" }.join( ' OR ' ) + ')'
+ new_condition = '(' + columns_for_search.map { |col| "lower(#{col}) LIKE lower(?)" }.join( ' OR ' ) + ')'
if conditions.size > 0
conditions[0] = "(#{conditions[0]}) AND (#{new_condition})"
else
View
11 lib/auto_admin_simple_theme.rb
@@ -64,13 +64,12 @@ def wrap_field(field_type, field_name, options, &block)
#def self.append_features base
# # I don't think I actually need this cleverness...
# instance_methods(false).each do |meth|
- # base.class_eval <<-end_src, __FILE__, __LINE__
- # alias :shadow_#{meth} :#{meth}
- # end_src
+ # base.class_eval "alias :shadow_#{meth} :#{meth}", __FILE__, __LINE__
# end
# super
#end
end
+
def self.TableBuilder(form_builder)
klass = Class.new(form_builder)
klass.send :include, TableBuilder
@@ -251,12 +250,14 @@ def hidden_field(field, options = {})
super
end
def date_select(field, options = {})
+ options[:include_blank] = true
common_option_translations! options
- super
+ super(field, options)
end
def datetime_select(field, options = {})
+ options[:include_blank] = true
common_option_translations! options
- super
+ super(field, options)
end
def text_field_with_auto_complete(field, options = {})
common_option_translations! options
Please sign in to comment.
Something went wrong with that request. Please try again.