Created
May 14, 2011 02:17
-
-
Save AquaGeek/971634 to your computer and use it in GitHub Desktop.
Rails Lighthouse ticket #2667
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
rm -rf xhr_put_id | |
if [ "$1" = "git" ]; then | |
ruby /home/rubys/git/rails/railties/bin/rails xhr_put_id | |
cd xhr_put_id | |
ln -s /home/rubys/git/rails vendor/rails | |
else | |
rails xhr_put_id | |
cd xhr_put_id | |
fi | |
ruby script/generate controller users update | |
cat <<-EOF >test/integration/users_test.rb | |
require 'test_helper' | |
class UsersTest < ActionController::IntegrationTest | |
test "xhr" do | |
xml_http_request :put, "/users/update", :id => 17 | |
assert_response :success | |
end | |
end | |
EOF | |
sed -e "s/def update/def update; redirect_to 'index' unless params['id']/" -i app/controllers/users_controller.rb | |
rake db:migrate | |
rake test |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment