cost 67 ms
使用Rails 3视图继承,是否可以在子视图中调用“ super”,但发送父变量? - With Rails 3 view inheritance, is it possible to call “super” within a child view, but send the parent variables?

我的应用程序中的每个show action对于每个模型都有相同的模板(这是一个Admin-portal类型的界面)。 我有一个视图show.html.erb ,所有这些模型都继承。 控制器都使用InheritedResources,因此我可以访问一些帮助程序变量,例如resource , ...


排序:
质量:
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM