This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
default: &default | |
adapter: postgresql | |
encoding: utf8 | |
pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %> | |
host: <%= ENV['PG_HOSTNAME'] %> | |
timeout: 5000 | |
development: | |
<<: *default | |
database: <%= ENV['PG_DATABASE_DEV'] %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
default: &default | |
adapter: postgis | |
encoding: utf8 | |
pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %> | |
host: <%= ENV['PG_HOSTNAME'] %> | |
timeout: 5000 | |
development: | |
<<: *default | |
database: <%= ENV['PG_DATABASE_DEV'] %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I18n.load_path += Dir[Rails.root.join('config', 'locales','**', '*.{rb,yml}').to_s] | |
I18n.available_locales = [:es, :en] | |
I18n.default_locale = :es |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Rails.application.config.generators do |g| | |
g.assets = false | |
g.helper = false | |
g.decorator = false | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT Clientes.* | |
FROM Clientes | |
WHERE UPPER(Nombre) LIKE '%camion%' COLLATE Latin1_general_CI_AI |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT Clientes.* | |
FROM Clientes | |
WHERE UNACCENT(UPPER(Nombre)) LIKE UPPER('%camion%') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# HACK: Required to foce load env vars | |
if Rails.env.development? || Rails.env.test? | |
require 'dotenv/load' | |
end | |
class MyJob < ApplicationJob | |
queue_as :default | |
def perform(*args) | |
# Do something later |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module ContainsName | |
extend ActiveSupport::Concern | |
included do | |
# Scope definition here | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
statement = | |
<<-SQL | |
UPDATE customers set search_text = CONCAT(code,' ',name) where id = $1 | |
SQL | |
ActiveRecord::Base.connection.raw_connection.exec_params(statement, [id]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<meta name="robots" content="noindex"> | |
<meta name="googlebot" content="noindex"> |
OlderNewer