开发者

Will paginate in rails3

开发者 https://www.devze.com 2023-02-05 11:13 出处:网络
<%= will_paginate @semails, :renderer => \'RemoteLinkRenderer\' , :remote => { :loading => \'loadingPanel.show()\',:complete => \'loadingPanel.hide()\'} %>
<%= will_paginate @semails, :renderer => 'RemoteLinkRenderer' , :remote => {
:loading => 'loadingPanel.show()',:complete => 'loadingPanel.hide()'} %>

in rails2

h开发者_开发技巧ow to convert this to rails3 This is the routes using for rails 2 for semails

map.resources :users,
    :collection => {:uapload_avatars => :post, :aselect_friend => :get, :alist_friend => :get, :aist_moderator => :get},
    :member => {:anew_avatars => :get, :acreate_avatar => :post
     } do |user|

    user.resources :semails, :collection => { :sort => :get, :asave_draft =>  :post }

  end

how to convert this routes in rails 3 ?

I'm facing this error

will clicking the pagination link it just redirecting to the home page is that routes issue or will paginate issue in rails 3

please help me to solve this issue


I'm not 100% about the spelling but the new routes for rails would approximate something like this:

  resources :user do
    collection do
      post "uapload_avatars"
      get "aselect_friend"
    end
    resources :semails do
      collection do
        get "sort"
        post "asave_draft"
      end
    end
  end

http://guides.rubyonrails.org/routing.html

0

精彩评论

暂无评论...
验证码 换一张
取 消