From a570856156a0c0db724c44b12bc4abaad12b086f Mon Sep 17 00:00:00 2001 From: Seth Call Date: Thu, 6 Mar 2014 16:17:32 -0600 Subject: [PATCH] * fix for VRFS-1362 by not putting all query params back in URL --- admin/app/admin/icecast_bootstrap.rb | 2 +- web/app/controllers/users_controller.rb | 8 ++++++-- web/app/views/users/new.html.erb | 2 +- web/spec/requests/music_sessions_api_spec.rb | 2 +- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/admin/app/admin/icecast_bootstrap.rb b/admin/app/admin/icecast_bootstrap.rb index e07af5f20..84a5afbdb 100644 --- a/admin/app/admin/icecast_bootstrap.rb +++ b/admin/app/admin/icecast_bootstrap.rb @@ -222,7 +222,7 @@ ActiveAdmin.register_page "Bootstrap" do elsif IcecastMountTemplate.count == 0 semantic_form_for IcecastMountTemplate.new, :url => admin_bootstrap_create_mount_template_path, :builder => ActiveAdmin::FormBuilder do |f| f.inputs "New Mount Template" do - f.input :hostname, :label => "jam-web public hostname:port (such that icecast can reach it)" + f.input :hostname, :label => "UNUSED?? jam-web public hostname:port (such that icecast can reach it)" f.input :default_mime_type, :as => :select, :collection => ["ogg", "mp3"] end f.actions diff --git a/web/app/controllers/users_controller.rb b/web/app/controllers/users_controller.rb index 7d786ebd4..33b4ace7f 100644 --- a/web/app/controllers/users_controller.rb +++ b/web/app/controllers/users_controller.rb @@ -169,7 +169,7 @@ class UsersController < ApplicationController load_location(request.remote_ip, location) gon.signup_errors = true gon.musician_instruments = instruments - render 'new', :layout => 'web' + render "new", :layout => 'web' else sign_in @user @@ -443,6 +443,10 @@ class UsersController < ApplicationController query = {} query[:invitation_code] = invited_user.invitation_code if invited_user query[:facebook_signup] = fb_signup.lookup_id if fb_signup - signup_path + "?" + params.to_query + if query.length > 0 + signup_path + "?" + query.to_query + else + signup_path + end end end diff --git a/web/app/views/users/new.html.erb b/web/app/views/users/new.html.erb index 30c2dd4f4..064d7a335 100644 --- a/web/app/views/users/new.html.erb +++ b/web/app/views/users/new.html.erb @@ -3,7 +3,7 @@

Create a JamKazam account

- <%= form_for(@user, :url => @signup_postback) do |f| %> + <%= form_for(@user, :url => @signup_postback, :method => :post) do |f| %>
diff --git a/web/spec/requests/music_sessions_api_spec.rb b/web/spec/requests/music_sessions_api_spec.rb index 00e83efb3..82a80f2c5 100755 --- a/web/spec/requests/music_sessions_api_spec.rb +++ b/web/spec/requests/music_sessions_api_spec.rb @@ -301,7 +301,7 @@ describe "Music Session API ", :type => :api do client = FactoryGirl.create(:connection, :user => user, :ip_address => "1.1.1.1") post '/api/sessions.json', defopts.merge({:client_id => client.client_id, :tracks => nil}).to_json, "CONTENT_TYPE" => 'application/json' last_response.status.should eql(422) - JSON.parse(last_response.body)["errors"]["genres"][0].should == ValidationMessages::SELECT_AT_LEAST_ONE + JSON.parse(last_response.body)["errors"]["tracks"][0].should == ValidationMessages::SELECT_AT_LEAST_ONE # check that the transaction was rolled back MusicSession.all().length.should == original_count