The superglue generator generates a foobar.html.erb for each action, the examples also show usage like this, but its actually easy to dedup these files as they can get overwhelming. We just put them in application for example, instead of posts/index.html.erb, we put them in application/index.html.erb, that will make rails lookup that template higher in the lookup path.
To make this work, we'd need the following in the application controller
def render(...)
@active_template_name = _normalize_render(...)[:template]
super(...)
end
The superglue generator generates a
foobar.html.erb
for each action, the examples also show usage like this, but its actually easy to dedup these files as they can get overwhelming. We just put them inapplication
for example, instead ofposts/index.html.erb
, we put them inapplication/index.html.erb
, that will make rails lookup that template higher in the lookup path.To make this work, we'd need the following in the application controller
then change modify the
foobar.html.erb
files withI think we should
index.html.erb
,show.html.erb
,edit.html.erb
,new.html.erb
for the users when runningrails superglue:install:web
.Or both!