Sha256: 3680c7614d527e72f327fd95b7ce60c306d09148c9c5a23e8b359a5874713939
Contents?: true
Size: 719 Bytes
Versions: 18
Compression:
Stored size: 719 Bytes
Contents
require 'fake_app/active_record/config' if defined? ActiveRecord require 'fake_app/data_mapper/config' if defined? DataMapper require 'fake_app/mongoid/config' if defined? Mongoid require 'fake_app/mongo_mapper/config' if defined? MongoMapper #models require 'fake_app/active_record/models' if defined? ActiveRecord require 'fake_app/data_mapper/models' if defined? DataMapper require 'fake_app/mongoid/models' if defined? Mongoid require 'fake_app/mongo_mapper/models' if defined? MongoMapper class SinatraApp < Sinatra::Base register Kaminari::Helpers::SinatraHelpers get '/users' do @users = User.page params[:page] erb <<-ERB <%= @users.map(&:name).join("\n") %> <%= paginate @users %> ERB end end
Version data entries
18 entries across 18 versions & 8 rubygems