# Anchor
click_link 'Save'
# Button
click_button 'awesome'
# Both above
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
# See https://help.github.com/articles/ignoring-files for more about ignoring files. | |
# | |
# If you find yourself ignoring temporary files generated by your text editor | |
# or operating system, you probably want to add a global ignore instead: | |
# git config --global core.excludesfile '~/.gitignore_global' | |
# Ignore bundler config. | |
/.bundle | |
# Ignore all logfiles and tempfiles! |
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
require: | |
- rubocop-rspec | |
RSpec/Focus: | |
Enabled: true | |
RSpec/EmptyExampleGroup: | |
Enabled: true | |
RSpec/EmptyLineAfterExampleGroup: |
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
# Based on removed standard configuration: | |
# https://github.com/testdouble/standard/commit/94d133f477a5694084ac974d5ee01e8a66ce777e#diff-65478e10d5b2ef41c7293a110c0e6b7c | |
require: | |
- rubocop-rails | |
Rails/ActionFilter: | |
Enabled: true | |
EnforcedStyle: action | |
Include: |
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
# Inherit from TODO here to make sure we enforce the rules below | |
# (and TODO is ignored) | |
inherit_from: | |
- .rubocop_todo.yml | |
Lint/Debugger: # don't leave binding.pry | |
Enabled: true | |
Exclude: [] | |
RSpec/Focus: # run ALL tests on CI |
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 ApplicationHelper | |
# date/time | |
def format_time(time) | |
time&.strftime "%H:%M" | |
end | |
def format_date(date) | |
date&.strftime "%d.%m.%Y" | |
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
-- show running queries (pre 9.2) | |
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query | |
FROM pg_stat_activity | |
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
ORDER BY query_start desc; | |
-- show running queries (9.2) | |
SELECT pid, age(clock_timestamp(), query_start), usename, query | |
FROM pg_stat_activity | |
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |
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
table tr th {background:#222; color:#fff; padding:0; border:#111 solid 1px; text-align: center; font-weight: bold;} | |
table tr td {border:1px #ccc solid; padding:5px;} | |
table tr td.rightright {background: #eee;} | |
table tr td h4 {margin:0; padding:0; font-weight:normal;} | |
#from here => http://net.tutsplus.com/tutorials/other/building-a-forum-from-scratch-with-ruby-on-rails/ | |
table { |
Command Line
pry -r ./config/app_init_file.rb
- load your app into a pry session (look at the file loaded by config.ru)pry -r ./config/environment.rb
- load your rails into a pry session
Debugger