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
If i set default scope as below it works as seen in the count | |
------------ | |
default_scope where('start > ?', Time.now+1.hour) | |
irb(main):016:0> guide = Guide.bbc1.count | |
=> 481 | |
-------------------- | |
yet if i set it as below it doesn't? |
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
1 # Logfile created on 2011-10-24 18:08:09 +0100 by logger.rb/25413 | |
2 Starting: 2011-10-24 18:09:23 +0100 | |
3 Beginning: tv.xml, approx 24055698 | |
4 Finishing: 2011-10-24 19:57:50 +0100 | |
5 36170 |
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
*/01 * * * * cd ~/sites/www/twelly/ | |
*/01 * * * * rake get_twelly |
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
irb(main):062:0> puts time_start.class | |
ActiveSupport::TimeWithZone | |
=> nil | |
irb(main):063:0> distance_of_time_in_words(time_start, Time.now) | |
NoMethodError: undefined method `distance_of_time_in_words' for main:Object | |
from (irb):63 | |
from /usr/local/lib/ruby/gems/1.9.1/gems/railties-3.0.9/lib/rails/commands/console.rb:44:in `start' | |
from /usr/local/lib/ruby/gems/1.9.1/gems/railties-3.0.9/lib/rails/commands/console.rb:8:in `start' | |
from /usr/local/lib/ruby/gems/1.9.1/gems/railties-3.0.9/lib/rails/commands.rb:23:in `<top (required)>' | |
from script/rails:6:in `require' |
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
so i parse my tweet: | |
irb(main):033:0> p qry = reply[1] + " " + reply[2] | |
"bbc1 now" | |
=> "bbc1 now" | |
and these are the arguments that i would like to put on the class Guide | |
(eventually i will need to check that these do match the named scopes i have made) |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<guides type="array"> | |
<guide> | |
<channel>itv3.itv.co.uk</channel> | |
<start type="datetime">2011-10-23T14:35:00Z</start> | |
<title>*batteries not included</title> | |
</guide> | |
<guide> | |
<channel>channel4.com</channel> | |
<start type="datetime">2011-10-21T12:15:00Z</start> |
NewerOlder