This file contains 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
%table | |
%tr | |
%td | |
= f.label :share_type, 'Share Type', class: 'required' | |
%td | |
= f.select :share_type, @share_types, {}, class: 'share-type', id: 'selected_share_type' | |
%tr | |
%td | |
= f.label :share_expiration_date, 'Expiration Date', class: 'required' |
This file contains 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
%table | |
%tr | |
%td | |
= f.label :share_type, 'Share Type', class: 'required' | |
%td | |
= f.select :share_type, @share_types, {}, class: 'share-type', id: 'selected_share_type' | |
%tr | |
%td | |
= f.label :share_expiration_date, 'Expiration Date', class: 'required' |
This file contains 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
var initSubOptions = function(){ | |
$('#selected_share_type').change(function() { | |
populateSubOptions($(this).val()); | |
}); | |
}; | |
$(document).ready(function(){ | |
initSubOptions(); | |
}); |
This file contains 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
var populateSubOptions = function(selectedOption) { | |
if (selectedOption == 'share_across') { | |
$('#share_exp_dates select').empty().append(optionsFromArray(share_across_options)); | |
} else { | |
$('#share_exp_dates select').empty().append(optionsFromArray(share_down_options)); | |
} | |
}; |
This file contains 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
var share_across_options = #{@share_across_dates}; | |
var share_down_options = #{@share_down_dates}; | |
var optionsFromArray = function(array){ | |
var options = ''; | |
$(array).each(function(index, item){ | |
options += '<option value="' + item[1] + '">' + item[0] + '</option>' | |
}); | |
return options; | |
}; |
This file contains 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
[1] pry(#<RSpec::Core::ExampleGroup::Nested_1>)> @user | |
=> #<User id: 7, is_active: true, is_admin: false, specialty_id: 0, state_id: nil, email: "[email protected]", password: "", first_name: nil, last_name: nil, send_email: nil, last_visit_date: nil, city: nil, zip: nil, encrypted_password: "$2a$04$9ktAdsmN27rQDBIDjWnYfufwFOSP8CKBiuHBz6BYKAu8...", password_salt: nil, reset_password_token: nil, sign_in_count: 0, failed_attempts: 0, current_sign_in_ip: nil, last_sign_in_ip: nil, confirmed_at: nil, created_at: "2012-11-05 22:19:28", current_sign_in_at: nil, last_sign_in_at: nil, locked_at: nil, remember_created_at: nil, reset_password_sent_at: nil, updated_at: "2012-11-05 22:19:28"> | |
[2] pry(#<RSpec::Core::ExampleGroup::Nested_1>)> @user.password | |
=> "password" |
This file contains 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
wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p194.tar.gz | |
tar -xvzf ruby-1.9.3-p194.tar.gz | |
cd ruby-1.9.3-p194/ | |
./configure | |
make |
This file contains 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
sudo apt-get -y update | |
sudo apt-get -y install build-essential zlib1g-dev libssl-dev libreadline-dev libyaml-dev libcurl4-openssl-dev curl git-core python-software-properties libxslt1-dev libxml2-dev libmysqlclient-dev libsqlite3-dev nodejs |
This file contains 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
sudo gem install passenger | |
sudo passenger-install-nginx-module | |
* Choose Option 1. Yes: download, compile and install Nginx for me. (recommended) | |
* Accept all defaults during the install process |
This file contains 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
wget -O init-deb.sh http://library.linode.com/assets/660-init-deb.sh | |
sudo mv init-deb.sh /etc/init.d/nginx | |
sudo chmod +x /etc/init.d/nginx | |
sudo /usr/sbin/update-rc.d -f nginx defaults |
OlderNewer