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
mysql> select '2005-03-27 03:00:00' > '2005-03-27 02:00:00'; | |
+-----------------------------------------------+ | |
| '2005-03-27 03:00:00' > '2005-03-27 02:00:00' | | |
+-----------------------------------------------+ | |
| 1 | | |
+-----------------------------------------------+ |
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
Index: app/models/content.rb | |
=================================================================== | |
--- app/models/content.rb (revision 17155) | |
+++ app/models/content.rb (working copy) | |
@@ -83,6 +83,16 @@ | |
end | |
end | |
+ named_scope :another_extract, lambda { |reading_level| {:include => [{:content_items => :reading_level}], :conditions => ["reading_levels.tag = ?", reading_level || 'unknown']}} | |
+ named_scope :another_recipe, lambda { |recipe| {:include => :recipe, :conditions => ["recipes.tag = ?", recipe]}} |
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
## Controller | |
class Program < ActiveRecord::Base | |
STATUSES = %w(pending live on_hold completed) | |
KINDS = %w(social_video youtube facebook twitter) | |
has_one :flight, :dependent => :destroy | |
has_one :creative, :dependent => :destroy | |
accepts_nested_attributes_for :flight | |
accepts_nested_attributes_for :creative | |
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
mysql> create table test(bool bit); | |
Query OK, 0 rows affected (0.06 sec) | |
mysql> insert into test values(1); | |
Query OK, 1 row affected (0.00 sec) | |
mysql> insert into test values(0); | |
Query OK, 1 row affected (0.00 sec) | |
mysql> select count(*) from test where bool; |
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
Index: app/controllers/mgm/search_controller.rb | |
=================================================================== | |
--- app/controllers/mgm/search_controller.rb (revision 18393) | |
+++ app/controllers/mgm/search_controller.rb (working copy) | |
@@ -57,9 +57,8 @@ | |
def perform_google_search(opts) | |
google_search = GoogleSearch.new(opts, @shop_id, "mgm_frontend", params[:page] || 1, | |
- session[:session_id]) | |
+ session[:session_id], PER_PAGE) |
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
479 max def status | |
479 max # TODO what options ? | |
479 max :TODO | |
479 max end | |
479 max | |
541 max def ref | |
541 max self.id | |
541 max 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
sudo mkdir -p /opt/local/var/db/postgresql83/defaultdb | |
sudo chown postgres:postgres /opt/local/var/db/postgresql83/defaultdb | |
sudo su postgres -c '/opt/local/lib/postgresql83/bin/initdb -D /opt/local/var/db/postgresql83/defaultdb' | |
sudo launchctl load -w /Library/LaunchDaemons/org.macports.postgresql83-server.plist |
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
diff --git a/actionpack/test/activerecord/active_record_store_test.rb b/actionpack/test/activerecord/active_record_store_test.rb | |
index 6f2fe32..98678d7 100644 | |
--- a/actionpack/test/activerecord/active_record_store_test.rb | |
+++ b/actionpack/test/activerecord/active_record_store_test.rb | |
@@ -31,7 +31,13 @@ class ActiveRecordStoreTest < ActionController::IntegrationTest | |
session[:foo] = "baz" | |
head :ok | |
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
diff --git a/actionpack/lib/action_controller/session/abstract_store.rb b/actionpack/lib/action_controller/session/abstract_store.rb | |
index 51acab2..2681db6 100644 | |
--- a/actionpack/lib/action_controller/session/abstract_store.rb | |
+++ b/actionpack/lib/action_controller/session/abstract_store.rb | |
@@ -206,11 +206,8 @@ module ActionController | |
cookie << "; HttpOnly" if options[:httponly] | |
headers = response[1] | |
- unless headers[SET_COOKIE].blank? | |
- headers[SET_COOKIE] << "\n#{cookie}" |
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
>> class Test | |
>> end | |
=> nil | |
>> a = Test.new | |
=> #<Test:0x1013248d8> | |
>> b = a.clone | |
=> #<Test:0x1012f1fa0> | |
>> a.object_id | |
=> 2157519980 | |
>> b.object_id |
OlderNewer