mirror of
https://github.com/kaminari/kaminari.git
synced 2022-11-09 13:44:37 -05:00
21 lines
373 B
Ruby
21 lines
373 B
Ruby
|
module Engine
|
||
|
class Engine < ::Rails::Engine
|
||
|
isolate_namespace ::Engine
|
||
|
end
|
||
|
end
|
||
|
|
||
|
Engine::Engine.routes.draw do
|
||
|
resources :users
|
||
|
end
|
||
|
|
||
|
# controllers
|
||
|
class Engine::UsersController < ::ApplicationController
|
||
|
def index
|
||
|
@users = User.page(params[:page]).per(3)
|
||
|
render :inline => <<-ERB
|
||
|
<%= @users.map(&:name).join("\n") %>
|
||
|
<%= paginate @users %>
|
||
|
ERB
|
||
|
end
|
||
|
end
|