Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.
=Navigating= | |
visit('/projects') | |
visit(post_comments_path(post)) | |
=Clicking links and buttons= | |
click_link('id-of-link') | |
click_link('Link Text') | |
click_button('Save') | |
click('Link Text') # Click either a link or a button | |
click('Button Value') |
Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.
http://www.zhlwish.com/2012/07/23/rails-activesupport-concern/
# autoload concerns
module YourApp
class Application < Rails::Application
# config.autoload_paths += %W(
# #{config.root}/app/controllers/concerns/
# #{config.root}/app/models/concerns/
# )
#!/usr/bin/env ruby | |
# Checks for things that I often commit accidentally and bails out of the | |
# commit. To skip this pre-commit hook use `git commit --no-verify`. | |
checks = [ | |
/\bddescribe\b/, | |
/\biit\b/, | |
/\bxit\b/, | |
/binding.pry/, |
users = User.arel_table | |
query = users.project(users[Arel.star]) |
# Extended configuration for Thinking Sphinx can be stored in the | |
# config/thinking_sphinx.yml file within your application (this file was | |
# previously known as config/sphinx.yml in TS v1/v2). | |
# | |
# Many settings from Sphinx itself can be set here, and they'll flow through to | |
# the appropriate section of the generated configuration. However, some are | |
# used for Thinking Sphinx behaviour, and so those are documented here first. | |
# | |
# Configuration is grouped by environment, just like config/database.yml in a | |
# standard Rails application. |