demarches-normaliennes/app/controllers/demo_controller.rb

14 lines
408 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,
Procedure.where(archived: false, published: true),
2016-01-07 11:41:03 +01:00
partial: "demo/list",
array: true
2015-11-17 18:30:28 +01:00
end
end