Ich habe eine haml-Teil erstellt, die ich als Standard-Header verwenden möchte. Beim Rendern möchte ich optional einen Block geben, um einen Teil des Standardinhalts zu ersetzen.Rails 4, render ein partielles/Layout mit optionalen Block innerhalb von haml
Ich habe versucht, mehrere Dinge:
render partial: "partial", capture: do
# Don't really know why I tried this, Syntax error ofcourse.
render partial: "partial" do
# 'nil' is not an ActiveModel-compatible object. It must implement :to_partial_path.
render layout: "partial" do
# Works, but:
render layout: "partial"
# You invoked render but did not give any of :partial, :template, :inline, :file or :text option.
# So, it always needs the block
Alle anderen Optionen Ich weiß nicht, von?