nested-resources

    1熱度

    3回答

    這裏的routes.rb中: map.resources :assignments, :shallow => true do |assignment| assignment.resources :problems end 我如何獲得url編輯問題(/任務/ XYZ /問題/ ABC /編輯),在代碼中?我已經嘗試了 edit_assignment_problem_path(作業,問

    0熱度

    2回答

    賦予了博客風格的應用程序: #models class Post < ActiveRecord::Base has_many :comments end class Comment < ActiveRecord::Base belongs_to :post end #routes.rb map.resources :posts do |posts| p