lib/admino/table/head_row.rb in admino-0.0.4 vs lib/admino/table/head_row.rb in admino-0.0.5
- old
+ new
@@ -18,11 +18,14 @@
def actions(*args, &block)
default_options = column_html_options(:actions)
label = I18n.t(
:"#{resource_klass.model_name.i18n_key}.title",
scope: 'table.actions',
- default: [ :title, 'Actions' ]
+ default: [
+ :title,
+ 'Actions'
+ ]
)
@columns << h.content_tag(:th, label.to_s, default_options)
end
@@ -57,12 +60,10 @@
end
private
def column_html_options(attribute_name)
- if attribute_name
- { role: attribute_name.to_s.gsub(/_/, '-') }
- end
+ { role: attribute_name.to_s.gsub(/_/, '-') }
end
end
end
end