Sha256: 43a2394cb6894d38dfab571967dbce118fafa8e52cde478d9878b994bba2ee60
Contents?: true
Size: 620 Bytes
Versions: 3
Compression:
Stored size: 620 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://cdnjs.cloudflare.com/ajax/libs/foundation/5.0.3/css/foundation.min.css" rel="stylesheet"> </head> <body> </br> <%= 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
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
will_paginate-foundation-6.2.1 | example/app.rb |
will_paginate-foundation-6.2.0 | example/app.rb |
will_paginate-foundation-5.3.4 | example/app.rb |