File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
app/lib/matestack/ui/core Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -40,8 +40,20 @@ def render(*args)
4040 # In this example, `clients/bookings#index` will render `Pages::Clients::Bookings`,
4141 # `clients/bookings#show` will render `Pages::Clients::Booking`.
4242 #
43+ # Custom action names translate also into page names.
44+ #
45+ # class Clients::BookingsController < ApplicationController
46+ # def step1
47+ # end
48+ # end
49+ #
50+ # In this example, the `clients/bookings#step1` action will render
51+ # `Pages::Clients::Bookings::Step1`.
52+ #
4353 def default_render ( *args )
44- matestack_class_name_parts = "pages/#{ controller_path } " . split ( "/" ) . collect { |str | str . camelcase }
54+ matestack_page_path = "pages/#{ controller_path } "
55+ matestack_page_path = "#{ matestack_page_path } /#{ action_name } " unless action_name . in? %w( index show )
56+ matestack_class_name_parts = matestack_page_path . split ( "/" ) . collect { |str | str . camelcase }
4557 matestack_class_name_parts [ -1 ] = matestack_class_name_parts [ -1 ] . singularize if action_name == "show"
4658 matestack_class_name = matestack_class_name_parts . join ( "::" )
4759 begin
You can’t perform that action at this time.
0 commit comments