How do I use instance variables, defined in the controller, in the view with ActiveAdmin?
问题 I have this: ActiveAdmin.register User do controller do def show @user = User.find(params[:id]) show! end end show do attributes_table do row "User" do link_to @user.display_name, user_path(@user.slug) end end end end But when I load the page, I get an error saying: undefined method `display_name' for nil:NilClass which means that @user is nil. I am positive that @user is set appropriately (meaning the finder is getting appropriate data that exists in the db). I'm thinking it has something to