Sha256: 896261b55d2659bc97b7b37609e298a230a7c0b5ce41097cedcc82e5d6fb771e
Contents?: true
Size: 452 Bytes
Versions: 3
Compression:
Stored size: 452 Bytes
Contents
class EventsController < ApplicationController include Polygallery::StrongParams def create raise 'BOOM' @event = Event.new event_params if @event.save flash[:success] = 'Your event has been saved!' else flash[:error] = 'Your event could not be saved!' end redirect_to root_path end private def event_params params.require(:event).permit(:title, :gallery_attributes => polygallery_params) end end
Version data entries
3 entries across 3 versions & 1 rubygems