@@ -69,7 +69,7 @@ def #{action_name}_submit
69
69
post_params = params['method_params'] ? params['method_params'].dup : nil
70
70
params = []
71
71
@scaffold_method.expects.each_with_index do |spec, i|
72
- params << post_params[i.to_s]
72
+ params << post_params[i.to_s]
73
73
end if @scaffold_method.expects
74
74
params = @scaffold_method.cast_expects(params)
75
75
method_name = public_method_name(@scaffold_service.name, @scaffold_method.public_name)
@@ -106,9 +106,9 @@ def setup_invocation_assigns
106
106
def render_invocation_scaffold(action)
107
107
customized_template = "\# {self.class.controller_path}/#{ action_name } /\# {action}"
108
108
default_template = scaffold_path(action)
109
- if template_exists?(customized_template)
109
+ begin
110
110
content = @template.render(:file => customized_template)
111
- else
111
+ rescue ActionView::MissingTemplate
112
112
content = @template.render(:file => default_template)
113
113
end
114
114
@template.instance_variable_set("@content_for_layout", content)
@@ -125,7 +125,7 @@ def scaffold_path(template_name)
125
125
126
126
def reset_invocation_response
127
127
erase_render_results
128
- response.headers = :: ActionController::AbstractResponse ::DEFAULT_HEADERS.merge("cookie" => [])
128
+ response.instance_variable_set :@header, Rack::Utils::HeaderHash.new(:: ActionController::Response ::DEFAULT_HEADERS.merge("cookie" => []) )
129
129
end
130
130
131
131
def public_method_name(service_name, method_name)
0 commit comments