Problem user_name = "I'm Tony" User.where("name like '%#{user_name}%'") # => SELECT `users`.* FROM `users` WHERE (name like '%I'm Tony%') => ActiveRecord::StatementInvalid: Mysql2::Error: You have an error in your SQL syntax;...
For all environment
Set authentication in ApplicationController
# app/controllers/application_controller.rb
class ApplicationController < ActionController::Base
http_basic_authenticate_with name: 'username', password: 'password'
end
Logging provides critical value to applications with insight to usage, stats, and metrics, and saves us when debugging a problem. But we often leave logging to poorly implemented afterthoughts. So...
For all environment
Set authentication in ApplicationController
# app/controllers/application_controller.rb
class ApplicationController < ActionController::Base
http_basic_authenticate_with name: 'username', password: 'password'
end
Instagram is a simple way to capture and share the world's moments. Follow your friends and family to see what they're up to, and discover accounts from all ...
Problem user_name = "I'm Tony" User.where("name like '%#{user_name}%'") # => SELECT `users`.* FROM `users` WHERE (name like '%I'm Tony%') => ActiveRecord::StatementInvalid: Mysql2::Error: You have an error in your SQL syntax;...
Moment.js is a fantastic time & date library with lots of great features and utilities. However, if you are working on a performance sensitive web application, it might cause a...