Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: f1903aba6a
Fetching contributors…

Cannot retrieve contributors at this time

file 18 lines (13 sloc) 0.565 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
Application.class_eval do
  
  if environment == :development
    
    get '/spec/js/setup.json' do
      @user = User.find_or_create_by_identifier('test')
      @site = Site.find_by_name('test').destroy rescue
      @site = Site.create(:name => 'test', :user_id => @user.id)
      
      Env.create(:name => 'test', :user_id => @user.id, :site_id => @site.id)
      
      Variant.delete(2)
      Variant.connection.insert("INSERT INTO variants (id, name, site_id, user_id) VALUES (2, 'test', #{@site.id}, #{@user.id})")
      
      true.to_json
    end
  end
end
Something went wrong with that request. Please try again.