| eadz | phuor: yeah, weird behavior. |
| phuor | eadz: I mean, what's the point? |
| eadz | when i check the value, i want to compare against symbols not strings phuor: ok, serialise works :) phuor: but no idea why it searilised it in the first place |
| toretore | sashthebash: do you need to? |
| sashthebash | yes |
| toretore | why? |
| sashthebash | i want to mark the latest visit thats my problem :/. so i can highlight it in the view |
| toretore | @latest_visits.include?(visit) |
| hollandlucas | There's a beginner's book for Rails coming from Apress I think it was mentioned in the rails podcast and it's supposed to be pretty good I might pick it u p |
| BrianB04 | Beginning Rails? Or Rails from Beginner to Expert? I know those are two of the more popular beginner series names. |
| hollandlucas | it's this one: http://www.apress.com/book/bookDisplay.html?bID=10124 it's not out yet |
| BrianB04 | That was the second one I said, just not beginner...I figured it would be one of those two though. |
| hollandlucas | it is written for beginners to rails (I don't know how much programming knowledge the authors assume) |
| BrianB04 | They have it in betaBook, which you could pick it up, and then when it was done you would get a copy. |
| sashthebash | toretore: that works but now i duplicated all the objects... but i think i will stick with that |
| hollandlucas | I like to have a proper book |
| toretore | sashthebash: that's better than introducing an attribute in the model that's only there to please the view |
| sashthebash | yep your right... i changed it now so the array just contains the ids of the latest objects thx |
| toretore | sashthebash: that doesn't make a difference.. the array will only contain references to the objects |
| idrysdale | Hi everyone, I'm quite new to ruby If I have a string or several sentences of text, i.e. "The cat is fat. She is very fat. Oh yes." what method can I call to return the first 2 sentences? I've been looking at slice, is this correct? |
| BrianB04 | Oh, alright, so in the Comments model, it belogs_to :post and post has_many :comments...I get it. |
| idrysdale | Anyone good at string manipulation? :) |
| aglet | is there a Rails idiom for catching empty rows in tables, rather than having to do <% unless blah.nil? blah %> ? |
| toretore | aglet: what's an empty row? |
| rik | aglet: personally, i do a Foo.find() || [] then an each will always work. |
| aglet | uhuh -- at the moment if I start with an empty database rhtml barfs up lots of "You have a nil object when you didn't expect it!" errors so instead of doing, for example, "@expiries = Domain.find(:all, :order => "date_expires")" then "<% expiry = @expiries[0] %>" what would you do..? |