module Admin::UniversalTablesHelper
def format_date(date, format, for_editing=false)
case format
when "yyyy/MM/dd hh:mm"
f = "%Y/%m/%d %H:%M"
when "yyyy/MM/dd"
f = "%Y/%m/%d"
when "yyyy/MM"
f = "%Y/%m"
when "yyyy"
f = "%Y"
f = "%Y/%m" if for_editing
end
d = date.strftime(f) rescue ""
return d
end
def render_unique_texts(f,column,i)
select_values = column.column_entries.distinct(:text)
select = ""
"