Mirv / basicb

Basic is as basic does...
https://github.com/Mirv/basicb/wiki
0 stars 0 forks source link

Issues with record id not found #70

Open Mirv opened 7 years ago

Mirv commented 7 years ago

Instead of rescuing exception on the application_controller I need to implement Before_validation ... bit of it shown here but research what else is needed...

http://guides.rubyonrails.org/v2.3.11/activerecord_validations_callbacks.html#callbacks-overview

Mirv commented 7 years ago
class ApplicationController < ActionController::Base
  # Prevent CSRF attacks by raising an exception.
  # For APIs, you may want to use :null_session instead.
  protect_from_forgery with: :exception
  # This might need to be rescue => e at some point
  rescue_from ActiveRecord::RecordNotFound, :with => :record_not_found
Mirv commented 6 years ago

Options: