demarches-normaliennes/app/controllers/demo_controller.rb

14 lines
351 B
Ruby
Raw Normal View History

2015-11-17 18:30:28 +01:00
class DemoController < ApplicationController
2016-01-07 11:41:03 +01:00
include SmartListing::Helper::ControllerExtensions
helper SmartListing::Helper
2015-11-17 18:30:28 +01:00
def index
return redirect_to root_path if Rails.env.production?
2016-01-07 11:41:03 +01:00
smart_listing_create :procedures,
2017-07-10 16:48:32 +02:00
Procedure.published.not_archived.order("id DESC"),
2017-06-12 13:49:51 +02:00
partial: "demo/list",
array: true
2015-11-17 18:30:28 +01:00
end
end