我試圖讓活動時,在用戶點擊按鈕叫display 控制器: def display
@activities = Activity.all
@activities = Activity.order("created_at desc")
#we will need to find the Post id Through Users relation to the Comm
我想渲染一個部分,但它不使用我的@user_name變量。當你在控制器中渲染一個局部變量時,你需要做一些特殊的事情來傳遞變量嗎? 看看Rails指南,我沒有看到任何說@instance_variables將不可用的部分。 這裏是我的用戶#新的控制器: def new
if signed_in?
redirect_to current_user
else