KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I can't seem to access instance objects in partials. Example: In controller I have: ActiveAdmin.register Store do sidebar "Aliases", :only => :edit do @aliases = Alias.where("store_id = ?", params[:id]) render :partial => "store_aliases" end end Then in the _store_aliases.html.erb partial I have: <% @aliases.each do |alias| %> <li><%= alias.name %></li> <% end %> This doesn't work. The only thing that does work (which is horrible to do as I'm putting logic in a view is this: <% @aliases = Alias.where("store_id = ?", params[:id]) %> <% @aliases.each do |alias| %> <li><%= alias.name %></li> <% end %>
Tags (comma-separated)
Save Edits
Cancel