어떻게 리디렉션을 사용하고 개체를 편집 작업에 전달합니까? 다음 코드는 작동하지 않습니다어떻게 리디렉션을 사용하고 개체를 편집 작업에 전달합니까?
def edit
@promotion = Promotion.find_by_id(@params['promo_id'])
end
def update
promotion = Promotion.find(params[:promotion_profile][:promotion_id])
promo_perfil = promotion.profile
if promo_perfil.update_attributes(params[:promotion_profile])
redirect_to admin_edit_path(promotion.id => @params[:promo_id])
else
end
어떻게 든 같은 질문을 던졌습니다. http://stackoverflow.com/questions/6865452/how-do-you-use-redirect-to-when-the-action-is-dependent-on-a-parameter 너는 내 대답을 받아들이거나 코멘트를 기다리고있다. – apneadiving