improve events
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user