Да, вы можете сделать это. И если вы, возможно, сделаете один макет nil, чтобы он хорошо отображался в ваших видах
скажем (в следующем примере в качестве макета используется my_controller)
class my_controller < application_controller
def my_parent_method
@text_from_my_child_method = child_method
end
def child_method
return 'hello from child_method'
render :layout => false #here we are making the child_method layout false so that it #will not effect the parent method
end
end
и в вашем my_parent_method.rhtml (просмотр) вы можете использовать переменную
<%= @text_from_my_child_method %> and it should print 'hello from child_method'
надеюсь, это поможет
веселит,
Самира