I hereby claim:
- I am pixeltrix on github.
- I am pixeltrix (https://keybase.io/pixeltrix) on keybase.
- I have a public key whose fingerprint is 64AC 62AF 61FE B618 2F5B D9AA E2AE 198C 7AE0 543D
To claim this, I am signing this object:
require 'active_record' | |
require 'logger' | |
require 'minitest/autorun' | |
ActiveRecord::Base.establish_connection(adapter: 'sqlite3', database: ':memory:') | |
ActiveRecord::Base.logger = Logger.new(STDOUT) | |
ActiveRecord::Schema.define do | |
create_table :texts do |t| | |
t.string :title |
# Run this code inside your Rails application | |
# | |
# Rails 2.3: | |
# script/runner unsafe_query_check.rb | |
# | |
# Rails 3.0 and later | |
# rails runner unsafe_query_check.rb | |
connection = ActiveRecord::Base.connection | |
tables = connection.tables |
en: | |
short_names: | |
default: | |
male: "Mr %{surname}" | |
female: "Ms %{surname}" | |
full_names: | |
default: | |
male: "%{given_name} %{surname}" | |
female: "%{given_name} %{surname}" | |
not_specified: "%{given_name} %{surname}" |
I hereby claim:
To claim this, I am signing this object:
class Kid | |
attr_reader :name, :naughty, :nice | |
def initialize(name, options = {}) | |
@name = name | |
@naughty = options.fetch(:naughty, false) | |
@nice = options.fetch(:nice, false) | |
end | |
alias_method :naughty?, :naughty |
<!doctype html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes"> | |
<style> | |
h1, | |
h2, | |
h3, | |
h4, |
class Person < ActiveRecord::Base | |
validates :name, presence: true, length: { maximum: 255 } | |
validates :date_of_birth_day, presence: true, format: /\A\d{1,2}\z/ | |
validates :date_of_birth_month, presence: true, format: /\A\d{1,2}\z/ | |
validates :date_of_birth_year, presence: true, format: /\A\d{4}\z/ | |
validates :date_of_birth, presence: true | |
validate do | |
if building_date_of_birth? |
<%= f.label :appointment_time %><br> | |
<%= f.fields_for :appointment_time, @person.appointment_time do |t| %> | |
<%= t.text_field :day, size: 2, placeholder: 'DD' %> / | |
<%= t.text_field :month, size: 2, placeholder: 'MM' %> / | |
<%= t.text_field :year, size: 4, placeholder: 'YYYY' %> - | |
<%= t.text_field :hour, size: 2, placeholder: 'HH' %> : | |
<%= t.text_field :min, size: 2, placeholder: 'MM' %> | |
<% end %> |
From 832c042e2c8eba2200627cc62de2854edcfb07c1 Mon Sep 17 00:00:00 2001 | |
From: thedarkone <nobody> | |
Date: Wed, 11 Feb 2009 21:39:48 +0100 | |
Subject: [PATCH] Port fast reloadable templates from rails-dev-boost. | |
--- | |
actionmailer/test/abstract_unit.rb | 1 + | |
actionmailer/test/mail_service_test.rb | 2 +- | |
actionpack/lib/action_controller/rescue.rb | 2 +- | |
actionpack/lib/action_view.rb | 1 + |