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
| def weight=(weight) | |
| write_attribute(:weight, weight.to_d.ceil.to_i) | |
| end |
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
| require 'spec_helper.rb' | |
| describe ArticlesController do | |
| describe 'GET index' do | |
| before(:each) do | |
| 10.times do |i| | |
| Factory(:article, :title => "Article #{i}") | |
| end | |
| @unpublished_article = Factory(:article, :title => "Unpublished Article", :published_at => Date.tomorrow) |
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
| export PATH=/usr/local/bin:$PATH |
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
| #slider-description1.animate-in, | |
| #slider-description2.animate-in, | |
| #slider-description3.animate-in, | |
| #slider-description4.animate-in { | |
| opacity: 1; | |
| filter: alpha(opacity=100); | |
| top: 300px; | |
| -webkit-transition: 1s; | |
| -moz-transition: 1s; | |
| -ms-transition: 1s; |
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
| 002RevzAdIT | |
| Parameters: {"order_number"=>"002RevzAdIT", "guid"=>"002RevzAdIT-0881062468", "ip_address"=>"70.88.5.237", "shipping_amount"=>"0.00", "shipping_amount_usd"=>"0.00", "tax_amount"=>"0.92", "tax_amount_usd"=>"0.92", "subtotal"=>"9.95", "subtotal_usd"=>"9.95", "currency_num"=>"840", "email_address"=>"[email protected]", "billing"=>{"first_name"=>"[FILTERED]", "last_name"=>"[FILTERED]", "middle_initial"=>false, "address"=>"1234 Something Street", "address2"=>"", "city"=>"Nashville", "province"=>"TN", "postal_code"=>"37216", "country_code"=>"US", "phone"=>"5555555555"}, "shipping"=>{"first_name"=>"[FILTERED]", "last_name"=>"[FILTERED]", "middle_initial"=>"", "address"=>"1234 Something Street", "address2"=>"", "city"=>"Nashville", "province"=>"TN", "postal_code"=>"37216", "country_code"=>"US", "phone"=>"5555555555"}, "commodities"=>[{"name"=>"[FILTERED]", "sku"=>"INA118101", "description"=>"<ul>\v<li>Set of 2 perfect-bound, blank journals</li>\v<li>4 1/4\" x 6 1/2\" x 3/4\"</li>\v<li>150 lined |
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
| config.before :suite do | |
| DatabaseCleaner.strategy = :transaction | |
| DatabaseCleaner.clean_with(:truncation) | |
| end | |
| # Request specs cannot use a transaction because Capybara runs in a | |
| # separate thread with a different database connection. | |
| config.before type: :request do | |
| DatabaseCleaner.strategy = :truncation | |
| end |
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
| 2012-08-05 00:16:20 [INFO] comike011 [/76.22.251.80:35696] lost connection | |
| java.net.SocketTimeoutException: Read timed out | |
| at java.net.SocketInputStream.socketRead0(Native Method) | |
| at java.net.SocketInputStream.read(SocketInputStream.java:129) | |
| at java.io.FilterInputStream.read(FilterInputStream.java:116) | |
| at akm.a(Unknown Source) | |
| at akm.read(Unknown Source) | |
| at java.io.FilterInputStream.read(FilterInputStream.java:66) | |
| at db.a(SourceFile:169) | |
| at bb.i(SourceFile:240) |
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
| def current_user_session(force_reload=false) | |
| return @current_user_session unless force_reload || !defined?(@current_user_session) | |
| @current_user_session = UserSession.find | |
| end | |
| def current_user(force_reload=false) | |
| return @current_user unless force_reload || !defined?(@current_user) | |
| @current_user = current_user_session(force_reload) && current_user_session.user | |
| end |
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
| PS1="\n\[$YELLOW\]\@ \[$GREEN\]\u\[$NO_COLOR\]@\[$GREEN\]\h \[$YELLOW\][\$(rvm-prompt i v)]\[$NO_COLOR\]:\w \[$CYAN\]\$(vcprompt)\[$NO_COLOR\] \n→ " |
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
| def export_to_js(name, value, opts={}) | |
| s = <<RUBY | |
| <script type="text/javascript"> | |
| DATA['#{name}'] = #{value.to_json(opts).html_safe}; | |
| </script> | |
| RUBY | |
| s.html_safe | |
| end | |
| put this in the application helper. |