link_to删除不在rails 4中工作?

时间:2013-12-24 11:21:10

标签: routing ruby-on-rails-4

目前我正在将我的rails应用程序升级到rails 4.升级后删除方法无效。当我检查日志时将其打印为get方法。

code :view file:
<%= link_to image_tag("/images/iconDeleteActive.png", :alt=>"Delete",:border=>"0", :title=>'Delete'),client_admin_property_path    (user_id,property.id,:sort => params[:sort] || 'Commercial'),:method=>:delete %>

routes:
 scope :module => "client_admin"  do
    resources :client_admin do
    resources :properties
    end
    end

log:
Started GET "/client_admin/61/properties/5126?sort=Commercial"
AbstractController::ActionNotFound - The action 'show' could not be found for ClientAdmin::PropertiesController:

对此有什么想法吗?

1 个答案:

答案 0 :(得分:0)

尝试将:method更改为'data-method'