My Recent Pastes (39 and counting)
Pastes by Mikel Lindsaar (39 and counting)
Below are the 15 most recent pasties by Mikel Lindsaar.
July 08, 2007
2:38AM EDT
by Mikel Lindsaar
View all 6 lines
def destroy
@paragraph = Paragraph.find(params[:id])
@paragraph.destroy
redirect_to :edit unless request.xhr?
set_pagination_variables
July 08, 2007
2:34AM EDT
by Mikel Lindsaar
View all 23 lines
# I am getting: # 1) # SystemStackError in 'AssignmentsController (independantly), the destroy actions # should delete the item and return the correct set of page variables'
July 06, 2007
5:22AM EDT
by Mikel Lindsaar
View all 16 lines
# How would I write a spec for this? # specifically the resuce... def wake_up_backgroundrb begin
July 03, 2007
8:56PM EDT
by Mikel Lindsaar
def self.up
add_column 'friendships', :approved, :boolean, :default => false
Friendship.find(:all).each { |f| f.update_attribute :approved, true if f.status == "approved" }
end
July 03, 2007
8:56PM EDT
by Mikel Lindsaar
View all 7 lines
def self.up
add_column 'friendships', :approved, :boolean, :default => 0
Friendship.find(:all).each { |f| f.update_attribute :approved, true if f.status == "approved" }
#remove_column(:friendships, :status)
July 01, 2007
4:41AM EDT
by Mikel Lindsaar
View all 21 lines
require 'autotest/redgreen'
# Speak failures via Apple's speech synth
module Autotest::Speak
def self.speak message
July 01, 2007
12:20AM EDT
by Mikel Lindsaar
View all 9 lines
?> text = "<body><p>Here is some <em>emphasized</em> text<p></body>" => "<body><p>Here is some <em>emphasized</em> text<p></body>" >> require 'hpricot' => [] >> html = Hpricot(text)
June 30, 2007
10:55PM EDT
by Mikel Lindsaar
View all 24 lines
baci:~/rails_apps/grr/vendor/rails/actionpack mikel$ rails grr <SUH-NIP!> baci:~/rails_apps/grr/vendor/rails/actionpack mikel$ cd grr
June 30, 2007
10:32PM EDT
by Mikel Lindsaar
View all 18 lines
baci:~/rails_apps/contribute/vendor/rails/actionpack mikel$ rake test (in /Users/mikel/rails_apps/contribute/vendor/rails/actionpack) /usr/local/bin/ruby -Ilib:test "/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake/rake_test_loader.rb" "test/controller/action_pack_assertions_test.rb" "test/controller/addresses_render_test.rb" "test/controller/assert_select_test.rb" "test/controller/base_test.rb" "test/controller/benchmark_test.rb" "test/controller/caching_test.rb" "test/controller/capture_test.rb" "test/controller/cgi_test.rb" "test/controller/components_test.rb" "test/controller/content_type_test.rb" "test/controller/cookie_test.rb" "test/controller/custom_handler_test.rb" "test/controller/deprecation/deprecated_base_methods_test.rb" "test/controller/filter_params_test.rb" "test/controller/filters_test.rb" "test/controller/flash_test.rb" "test/controller/fragment_store_setting_test.rb" "test/controller/helper_test.rb" "test/controller/html-scanner/document_test.rb" "test/controller/html-scanner/node_test.rb" "test/controller/html-scanner/tag_node_test.rb" "test/controller/html-scanner/text_node_test.rb" "test/controller/html-scanner/tokenizer_test.rb" "test/controller/http_authentication_test.rb" "test/controller/integration_test.rb" "test/controller/layout_test.rb" "test/controller/mime_responds_test.rb" "test/controller/mime_type_test.rb" "test/controller/new_render_test.rb" "test/controller/polymorphic_routes_test.rb" "test/controller/record_identifier_test.rb" "test/controller/redirect_test.rb" "test/controller/render_test.rb" "test/controller/request_test.rb" "test/controller/rescue_test.rb" "test/controller/resources_test.rb" "test/controller/routing_test.rb" "test/controller/selector_test.rb" "test/controller/send_file_test.rb" "test/controller/session/cookie_store_test.rb" "test/controller/session_management_test.rb" "test/controller/test_test.rb" "test/controller/url_rewriter_test.rb" "test/controller/verification_test.rb" "test/controller/view_paths_test.rb" "test/controller/webservice_test.rb" "test/template/active_record_helper_test.rb" "test/template/asset_tag_helper_test.rb" "test/template/benchmark_helper_test.rb" "test/template/compiled_templates_test.rb" "test/template/date_helper_test.rb" "test/template/form_helper_test.rb" "test/template/form_options_helper_test.rb" "test/template/form_tag_helper_test.rb" "test/template/java_script_macros_helper_test.rb" "test/template/javascript_helper_test.rb" "test/template/number_helper_test.rb" "test/template/prototype_helper_test.rb" "test/template/scriptaculous_helper_test.rb" "test/template/tag_helper_test.rb" "test/template/text_helper_test.rb" "test/template/url_helper_test.rb" Loaded suite /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake/rake_test_loader Started
June 29, 2007
6:12AM EDT
by Mikel Lindsaar
View all 32 lines
# the route
map.resources :documents, :member => { :ping => :get }
# the controller
def ping
June 23, 2007
11:48PM EDT
by Mikel Lindsaar
View all 42 lines
# Why does the first set of code raise an exception and the second # doesn't when running on the same test? # I don't mean why is my code causing errors, I can find that out # with a debugger and tests, but why would the below begin / end
June 11, 2007
11:01PM EDT
by Mikel Lindsaar
View all 22 lines
# I am calling BackgroundRB from a test:
job_key = MiddleMan.new_worker(:class => :book_import_worker,
:args => {:filename => filename,
:section_id => 1})
June 05, 2007
9:38AM EDT
by Mikel Lindsaar
View all 20 lines
Document has_many :paragraphs Paragraph belongs_to :document This gives unknown method fckeditor
June 04, 2007
6:14AM EDT
by Mikel Lindsaar
View all 19 lines
# Backslash conundrum # Needs to escape out backslashes and other characters # Has to save a file with all characters escaped out like # \% \[ \] \\ etc
June 04, 2007
1:42AM EDT
by Mikel Lindsaar
View all 13 lines
# TranslatedFootnote belongs to TranslatedParagraph which has_many TranslatedFootnotes # TranslatedParagraph belongs to TranslatedDocument which has_many TranslatedParagraphs # TranslatedDocument belongs to TranslatedSection which has_many TranslatedDocuments # # Is there an easier way to find the section_id from the paragraph?
