lib/trestle/admin/controller.rb in trestle-0.9.1 vs lib/trestle/admin/controller.rb in trestle-0.9.2

- old
+ new

@@ -19,10 +19,17 @@ end helper_method :admin protected def breadcrumbs - @breadcrumbs ||= admin.breadcrumbs.dup + @_breadcrumbs ||= admin.breadcrumbs.dup + end + + def flash_message(type, title:, message:) + { + title: admin.t("flash.#{type}.title", default: title), + message: admin.t("flash.#{type}.message", default: message) + } end end end end