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
ordered_ids = [5,2,3,1,4] # some array of ordered ids | |
records = Record.find(ordered_ids) # find the records that go with the ordered_ids | |
# loop the records and store them in a temp hash | |
temp_hash = {} | |
records.each do |record| | |
temp_hash[record.id] = record | |
end | |
# convert the temp_hash into a new array |
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
I think our problem is related to this: http://www.lostincode.net/blog/testing-devise-controllers | |
The test is consistently failing just loading the root path with... | |
ActionController::UnknownAction (ActionController::UnknownAction) | |
/Users/cameron/.rvm/gems/ree-1.8.7-2010.02@ch-admin/gems/devise-1.0.9/lib/devise/controllers/internal_helpers.rb:65:in `is_devise_resource?' | |
So, why not investigate what the method has? The method is in 'gems/devise-1.0.9/lib/devise/controllers/internal_helpers.rb:64 | |
def is_devise_resource? #:nodoc: |
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
module IpConversionTools | |
def self.included(base) | |
base.class_eval do | |
helper_method :ip_to_i | |
helper_method :ip_to_s | |
end | |
end | |
protected | |
def ip_to_i(ip=nil) |
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
context "foreign keys" do | |
def foreign_key_definition_to(to_table, options={}) | |
defaults = { :primary_key => "id", :column => "#{to_table.singularize}_id" } | |
defaults[:name] = "#{subject.class.table_name}_#{defaults[:column]}_fk" | |
options = defaults.merge(options) | |
Foreigner::ConnectionAdapters::ForeignKeyDefinition.new(subject.class.table_name, to_table, options) | |
end | |
it "should include some_model_records with dependent delete" do | |
subject.connection.foreign_keys(subject.class.table_name).should include(foreign_key_definition_to("some_model_records", { :dependent => :delete })) |
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
ree_1.8.7_url=http://rubyenterpriseedition.googlecode.com/files/ruby-enterprise-1.8.7-2011.01.tar.gz |
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
$.ajaxSetup({ | |
'beforeSend': function(xhr) { xhr.setRequestHeader('X-CSRF-Token', $("meta[name='csrf-token']").attr('content')); } | |
}); |
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
select table_name | |
from `information_schema`.`columns` | |
where table_schema = 'DB_NAME' and column_name = 'DESIRED_COLUMN_NAME'; |
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
cameron@cam-macbook-pro:~/.rvm/log$ cat /Users/cameron/.rvm/log/ree-1.8.7-2011.03/install.log | |
[2011-02-26 09:33:21] ./installer -a $/ree-1.8.7-2011.03 --no-tcmalloc --dont-install-useful-gems -c --with-readline-dir=/Users/cameron/.rvm/usr | |
Welcome to the Ruby Enterprise Edition installer | |
This installer will help you install Ruby Enterprise Edition 1.8.7-2011.03. | |
Don't worry, none of your system files will be touched if you don't want them | |
to, so there is no risk that things will screw up. | |
You can expect this from the installation process: | |
1. Ruby Enterprise Edition will be compiled and optimized for speed for this |
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
cameron@cam-debian:~$ aptitude show libgnutls26 | |
Package: libgnutls26 | |
State: installed | |
Automatically installed: no | |
Version: 2.10.5-1+b1 | |
Priority: standard | |
Section: libs | |
Maintainer: Debian GnuTLS Maintainers <[email protected]> | |
Uncompressed Size: 1,323 k | |
Depends: libc6 (>= 2.3), libgcrypt11 (>= 1.4.6), libtasn1-3 (>= 1.6-0), zlib1g (>= 1:1.1.4) |
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
cameron@cam-debian:~$ aptitude search libssl | |
p libcherokee-mod-libssl - Cherokee web server - SSL crypto functions plugin | |
i libssl-dev - SSL development libraries, header files and documentation | |
i A libssl-doc - SSL development documentation documentation | |
p libssl-ocaml - OCaml bindings for OpenSSL (r |
OlderNewer