Вы можете попробовать ниже, используя левое соединение
select * from tableA
left join tableB on A1=B1 and A2=B2
where B1 is null and B2 is null
Это кажется хорошим ...
# Rails 2 and below
render :file => "#{RAILS_ROOT}/public/404.html", :status => 404
# Rails 3 and up
render :file => "#{Rails.root}/public/404.html", :status => 404
render :file => '/path/to/some/filenotfound.rhtml',
status => 404, :layout => true
In the ApplicationController define a method like:
def render_404
render :file => "#{RAILS_ROOT}/public/404.html", :status => 404
end