How to stop NoMethodError when clicking #new & #edit?
问题 I'm having a hard time figuring out how to incorporate multiple controller's logic into a sidebar. For example, I want to have a section in the sidebar that uses @habits logic from the habits_controller and a section that uses @unaccomplished_goals logic from the goals_controller. For this question let's just focus on @unaccomplished_goals . <% @top_3_goals.each do |goal| %> shows correctly in the app's sidebar, which is derived from the goals_controller #index @top_3_goals = @unaccomplished