diff --git a/lib/plutonium/core/controller.rb b/lib/plutonium/core/controller.rb index ae08c96..0581da0 100644 --- a/lib/plutonium/core/controller.rb +++ b/lib/plutonium/core/controller.rb @@ -16,7 +16,8 @@ module Controller end helper Plutonium::Helpers - helper_method :make_page_title, :resource_url_for, :resource_url_args_for, :root_path + helper_method :make_page_title, :resource_url_for, + :resource_url_args_for, :root_path, :app_name append_view_path File.expand_path("app/views", Plutonium.root) layout -> { turbo_frame_request? ? false : "resource" } @@ -30,7 +31,11 @@ def set_page_title(page_title) end def make_page_title(title) - [title.presence, helpers.application_name].compact.join(" | ") + [title.presence, app_name].compact.join(" | ") + end + + def app_name + helpers.application_name end # diff --git a/lib/plutonium/ui/form/interaction.rb b/lib/plutonium/ui/form/interaction.rb index 90559fd..04bc073 100644 --- a/lib/plutonium/ui/form/interaction.rb +++ b/lib/plutonium/ui/form/interaction.rb @@ -25,7 +25,7 @@ def initialize_attributes end def submit_button(*, **) - super(*, **) do + super do object.label end end