Remise en place du flux

This commit is contained in:
echarp 2014-08-07 01:06:10 +02:00
parent c66a6b8a7f
commit fc5adc81c1

View File

@ -1,13 +1,14 @@
# Event life cycle # Event life cycle
# This is a central part to this project # This is a central part to this project
class EventsController < ApplicationController class EventsController < ApplicationController
before_action :set_events, only: [:index]
before_action :set_event, only: [:show, :edit, :update, :cancel, :destroy] before_action :set_event, only: [:show, :edit, :update, :cancel, :destroy]
before_action :check_secret, only: [:edit, :update, :cancel, :destroy] before_action :check_secret, only: [:edit, :update, :cancel, :destroy]
before_action :set_mailer_host before_action :set_mailer_host
def index def index
respond_to do |format| respond_to do |format|
format.html { set_events } format.html
format.rss do format.rss do
@events = @events.future_30.includes :related_city @events = @events.future_30.includes :related_city
@events = @events.limit params[:daylimit] if params[:daylimit] @events = @events.limit params[:daylimit] if params[:daylimit]