My Recent Pastes (540 and counting)
Pastes by rsl (540 and counting)
Below are the 15 most recent pasties by rsl.
June 12, 2008
2:01PM EDT
by rsl
View all 28 lines
require File.dirname(__FILE__) + '/../spec_helper' describe User do before(:each) do @user = User.new
June 12, 2008
11:46AM EDT
by rsl
View all 12 lines
spec
controllers
foos_controller_spec.rb
...
models
June 12, 2008
9:03AM EDT
by rsl
View all 23 lines
Processing MissionController#index (for 69.63.176.91 at 2008-06-12 08:53:03) [POST]
Session ID: BAh7CDoNZmFjZXRpbWVDOhZGYWNldGltZTo6U2Vzc2lvbnsIIhBzZXNzaW9u%0AX2tleSInMDg2YWZiNDhhZjA4MmJjZjQ5YTljNjkzLTYxNTM0MjA5NCIMZXhw%0AaXJlcyIGMCIIdWlkIg42MTUzNDIwOTQ6DHVzZXJfaWRpQCIKZmxhc2hJQzon%0AQWN0aW9uQ29udHJvbGxlcjo6Rmxhc2g6OkZsYXNoSGFzaHsABjoKQHVzZWR7%0AAA%3D%3D--68f8c0986a02ec84e61569e5de84fce7ec96746c
Parameters: {"fb_sig_time"=>"1213275182.8705", "fb_sig"=>"e3ceed27b525e599830532196fa74c55", "fb_sig_locale"=>"en_US", "action"=>"index", "fb_sig_session_key"=>"9e560926e7154cb5e90842ad-615342094", "fb_sig_position_fix"=>"1", "fb_sig_in_canvas"=>"1", "fb_sig_request_method"=>"GET", "controller"=>"mission", "fb_sig_expires"=>"0", "fb_sig_friends"=>"500040141,502390605,643538032,647859768,706580058,818405000,1101732425", "fb_sig_added"=>"1", "fb_sig_api_key"=>"bf5343bcde16fb193e7b4f6c9feb02eb", "fb_sig_profile_update_time"=>"1212667724", "fb_sig_user"=>"615342094"}
Facebook Params: {"user"=>"615342094", "added"=>"1", "in_canvas"=>"1", "session_key"=>"9e560926e7154cb5e90842ad-615342094", "profile_update_time"=>"1212667724", "expires"=>"0", "signature"=>"e3ceed27b525e599830532196fa74c55", "time"=>"1213275182.8705", "friends"=>"500040141,502390605,643538032,647859768,706580058,818405000,1101732425", "api_key"=>"bf5343bcde16fb193e7b4f6c9feb02eb", "request_method"=>"GET", "locale"=>"en_US", "position_fix"=>"1"}
{"session_key"=>"086afb48af082bcf49a9c693-615342094", "expires"=>"0", "uid"=>"615342094"}
June 12, 2008
8:09AM EDT
by rsl
View all 13 lines
sneaky:frog rsl$ mongrel_rails start -C config/mongrel.yml ** Loading settings from /Users/rsl/Dev/frog/config/mongrel.yml (they override command line). /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/yaml.rb:133:in `load': syntax error on line 17, col 15: `tion/x-java-a' (ArgumentError) from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/yaml.rb:133:in `load' from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/yaml.rb:144:in `load_file'
June 11, 2008
2:17PM EDT
by rsl
View all 6 lines
def filter_users_in_dev # dev application has to be public to allow pages adding if RAILS_ENV == "development" raise "Non-dev user!" unless %w(818405000 665420541).include?(params[:fb_sig_user]) end
June 11, 2008
10:59AM EDT
by rsl
View all 16 lines
def ping video = Video.find( :first, :conditions => [ "media_id = ?", params[ 'video_id' ] ] ) if params[ :filename ] =~ /(.flv)/ video.flv_encoded = true video.get_image( params[ :encoded_video_id ] )
June 11, 2008
9:56AM EDT
by rsl
View all 14 lines
ActionView::Base.field_error_proc = Proc.new do |html_tag, instance| error_class = "with_errors" if html_tag =~ /<label/ error_message = instance.object.errors.on(instance.method_name) html_tag.sub! /<\/label>/, " <em class=\"#{error_class}\">#{error_message}</em></label>"
June 10, 2008
2:30PM EDT
by rsl
View all 46 lines
#forgive me, this just isn't clear to me (yet)... # here is [part of] my project's SHOW view:
June 10, 2008
1:56PM EDT
by rsl
View all 10 lines
sneaky:hate rsl$ script/console Loading development environment (Rails 2.0.991) >> t = Time.now => Tue Jun 10 13:56:49 -0400 2008 >> t.class
June 10, 2008
8:13AM EDT
by rsl
desc "Restart the app" task :restart do run "touch #{current_path}/tmp/restart.txt" end
June 05, 2008
5:36PM EDT
by rsl
- form_for @foo do |f| = f.text_field :bar - fields_for :baz do |ff| = ff.text_field :quux
June 05, 2008
4:25PM EDT
by rsl
View all 15 lines
sneaky:optimized_oyster rsl$ git reset --hard 48c928610dc8d57d8b4deaf5d5b12d234ef9ccd5 HEAD is now at 48c9286... forgot to save sneaky:optimized_oyster rsl$ git status # Not currently on any branch. nothing to commit (working directory clean)
June 05, 2008
3:41PM EDT
by rsl
View all 34 lines
def handle_remember_cookie! if @current_user if valid_remember_cookie? @current_user.refresh_token # keeping same expiry date elsif params[:remember_me] == "1"
June 05, 2008
3:31PM EDT
by rsl
View all 9 lines
def handle_remember_cookie! new_cookie_flag return unless @current_user case when valid_remember_cookie? then @current_user.refresh_token # keeping same expiry date when new_cookie_flag then @current_user.remember_me
