1
0
Fork 0
mirror of https://github.com/kaminari/kaminari.git synced 2022-11-09 13:44:37 -05:00
kaminari--kaminari/spec/fake_app/engine/lib/engine.rb

21 lines
373 B
Ruby
Raw Normal View History

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