# Anchor
click_link 'Save'
# Button
click_button 'awesome'
# Both above
This file contains hidden or 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
| gem 'activerecord', '3.2.12' | |
| require 'active_record' | |
| require "minitest/autorun" | |
| require 'minitest/pride' | |
| require 'logger' | |
| ActiveRecord::Base.establish_connection(adapter: 'sqlite3', database: ':memory:') | |
| ActiveRecord::Base.logger = Logger.new(STDOUT) | |
| ActiveRecord::Schema.define do |
This file contains hidden or 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
| # app/models/concerns/slugable.rb | |
| module Slugable | |
| extend ActiveSupport::Concern | |
| included do | |
| validates_format_of :slug, :without => /^\d/ | |
| end | |
| module ClassMethods |
This file contains hidden or 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
| validateUser = makesure -> | |
| @permit "name email" # optional | |
| @attrs("name email").isNot('empty').orSay "can't be empty" | |
| userInput = | |
| name: "" | |
| description: "My description" | |
| admin: true | |
This file contains hidden or 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
| import React from "react"; | |
| import { render } from "react-dom"; | |
| const ParentComponent = React.createClass({ | |
| getDefaultProps: function() { | |
| console.log("ParentComponent - getDefaultProps"); | |
| }, | |
| getInitialState: function() { | |
| console.log("ParentComponent - getInitialState"); | |
| return { text: "" }; |
This file contains hidden or 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
| /* eslint-disable */ | |
| // For more infos, see: https://github.com/jquense/yup/blob/master/src/locale.js | |
| import { setLocale } from 'yup' | |
| const translation = { | |
| mixed: { | |
| default: '${path} é inválido', | |
| required: '${path} é um campo obrigatório', | |
| oneOf: '${path} deve ser um dos seguintes valores: ${values}', | |
| notOneOf: '${path} não pode ser um dos seguintes valores: ${values}', |
This file contains hidden or 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
| ruby '2.7.1' | |
| gem 'rails', github: 'rails/rails' | |
| gem 'tzinfo-data', '>= 1.2016.7' # Don't rely on OSX/Linux timezone data | |
| # Action Text | |
| gem 'actiontext', github: 'basecamp/actiontext', ref: 'okra' | |
| gem 'okra', github: 'basecamp/okra' | |
| # Drivers |
OlderNewer