Sha256: 9c97a56ea462bc5a9577335f7a09191569b73c1d781ce17051a407654ec88ae1
Contents?: true
Size: 600 Bytes
Versions: 4
Compression:
Stored size: 600 Bytes
Contents
require "sinatra" require "will_paginate-foundation" require "will_paginate/collection" $template = <<EOHTML <html> <head> <title>will_paginate-foundation Example App</title> <link href="http://cdn.jsdelivr.net/foundation/4.3.2/css/foundation.min.css" rel="stylesheet"> </head> <body> <%= will_paginate @collection, renderer: FoundationPagination::Sinatra %> </body> </html> EOHTML def build_collection page = if params[:page].to_i > 0 params[:page].to_i else 1 end @collection = WillPaginate::Collection.new page, 10, 100000 end get "/" do build_collection erb $template end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
will_paginate-foundation-5.3.3 | example/app.rb |
will_paginate-foundation-0.3.2 | example/app.rb |
will_paginate-foundation-0.3.1 | example/app.rb |
will_paginate-foundation-0.2 | example/app.rb |