Will_paginate in rails 3

时间:2011-01-20 07:21:46

标签: ruby-on-rails-3

<%= will_paginate @semails, :renderer => 'RemoteLinkRenderer' , :remote => {
:loading => 'loadingPanel.show()',:complete => 'loadingPanel.hide()'} %>

在rails2中

如何将其转换为rails3 这是使用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

如何在rails 3中转换此路由?

我正面临这个错误

点击它刚刚重定向到主页的分页链接是路由问题或将在rails 3中分页问题

请帮我解决这个问题

1 个答案:

答案 0 :(得分:0)

我不是100%关于拼写,但是rails的新路线大概是这样的:

  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