Rails flash messages with AJAX requests & twitter-bootstrap 2.3
Forked from https://gist.github.com/linjunpop/3410235 Based on Stackoverflow answer: http://stackoverflow.com/a/10167659/656428
License: MIT
class CreatePlaces < ActiveRecord::Migration | |
# Rails migration for GeoWorldMap db into postgresql db | |
#(inspired by http://blog.inspired.no/populate-your-database-with-free-world-cities-countries-regions-in-2-minutes-using-a-rails-migration-273/ post) | |
#extract files from GeoWorldMap.zip archive from here | |
# http://www.geobytes.com/GeoWorldMap.zip | |
# | |
#and place them into #{Rails.root}/db/migrate/ | |
##the archive has 'cities.txt' file, rename it 'Cities.txt' | |
#mv cities.txt Cities.txt |
<?php | |
# Register custom post types on the 'init' hook. | |
add_action( 'init', 'my_register_post_types' ); | |
/** | |
* Registers post types needed by the plugin. | |
* | |
* @since 1.0.0 | |
* @access public |
# This is a skeleton for testing models including examples of validations, callbacks, | |
# scopes, instance & class methods, associations, and more. | |
# Pick and choose what you want, as all models don't NEED to be tested at this depth. | |
# | |
# I'm always eager to hear new tips & suggestions as I'm still new to testing, | |
# so if you have any, please share! | |
# | |
# @kyletcarlson | |
# | |
# This skeleton also assumes you're using the following gems: |
Rails flash messages with AJAX requests & twitter-bootstrap 2.3
Forked from https://gist.github.com/linjunpop/3410235 Based on Stackoverflow answer: http://stackoverflow.com/a/10167659/656428
License: MIT
# select2_ajax helper to make capybara work with ajax-enabled Select2 elements | |
# assumes 'placeholder' option is used in Select2 (if it is using ajax, it should be) | |
# | |
# usage: | |
# | |
# it "should have a select2 field for searching by team name" do | |
# @team = Factory :team | |
# select2_ajax @team.name, :from => "Select a Team", :minlength => 4 | |
# click_button "Join" | |
# page.should have_content "You are now on '#{@team.name}'." |
marca@SCML-MarcA:/usr/local$ growlnotify | |
dyld: Symbol not found: _kSecRandomDefault | |
Referenced from: /usr/local/bin/growlnotify | |
Expected in: /System/Library/Frameworks/Security.framework/Versions/A/Security | |
in /usr/local/bin/growlnotify | |
Trace/BPT trap | |
marca@SCML-MarcA:/usr/local$ brew versions growlnotify | |
1.3 git checkout 2e23ced Library/Formula/growlnotify.rb | |
1.2.2 git checkout 5fb24f5 Library/Formula/growlnotify.rb |
## Prepare ################################################################### | |
# Remove RVM | |
rvm implode | |
# Ensure your homebrew is working properly and up to date | |
brew doctor | |
brew update | |
## Install ################################################################### |
=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') |