improve events

This commit is contained in:
Torsten
2023-06-12 15:47:54 +03:00
parent d2eaacaaad
commit 15ccc5eedb
19 changed files with 100 additions and 49 deletions

View File

@ -2,7 +2,7 @@ class EventsController < ApplicationController
before_action :set_event, only: %i[ show edit update destroy ]
def index
@events = Event.all
@events = Event.where("start_date > ? " , Date.today - 3.days)
end
def show
@ -55,6 +55,6 @@ class EventsController < ApplicationController
# Only allow a list of trusted parameters through.
def event_params
params.require(:event).permit(:name, :text, :start_date, :end_date,
:profile_id, :picture, :picture_cache)
:profile_id, :picture, :picture_cache , :info)
end
end