lib/forge/app/controllers/events_controller.rb in forge-cli-0.1.5 vs lib/forge/app/controllers/events_controller.rb in forge-cli-0.1.6

- old
+ new

@@ -40,6 +40,17 @@ respond_to do |format| format.html format.mobile { render :template => 'mobile/event' } end end + + def preview + @event = Event.new(params[:event]) + # call the private methods that cause the timestamps to be set properly + @event.send(:set_starts_at) + @event.send(:set_ends_at) + unless @event.published? + flash.now[:warning] = "This event is not yet published and will not appear on your live website." + end + render :action => :show + end end