onChange Event

vikramhimanshu Jan 9, 2014

Hello,

I'm brand new to ROR and in general server side programing. I'm a iOS developer who is trying to learn ROR.

I'm trying to use collection select to implement filtering for my page. The idea is there are a bunch of posts and I want to implement record filtering for those.

The first collectio...

Return value not correct

wr0ngway Nov 19, 2013

It seems like trap returns nil if the handler was "DEFAULT", but calling trap with nil causes a "IGNORE"

2.0.0-p247 :020 > p trap("CHLD", "DEFAULT")
nil
 => nil 
2.0.0-p247 :021 > p trap("CHLD", nil)
nil
 => nil 

So it seems that once you trap a signal, there isn't a way to...

Adjacency

julescopeland Nov 13, 2013

Just for completeness (it should behave like this), comparing ranges that start and end with the same value will overlap, e.g.

(1..5).overlaps?(5..10) # => true

Take care with time ranges

julescopeland Nov 13, 2013

Trying this in the console:

(1.day.from_now..5.days.from_now).overlaps?(5.days.from_now..10.days.from_now)

will blow up...

It's fine with Dates though:

(1.day.from_now.to_date..5.days.from_now.to_date).overlaps?(5.days.from_now.to_date..10.days.from_now.to_date) # => true

Correction

mestrecapablanca Nov 7, 2013 2 thanks

Where you see:

HelperData.new(datetime, options, html_options).select_hour

The correct would be:

HelperDate.new(datetime, options, html_options).select_hour

Class name and class instance must be same name.

Code works fine in Rails 3.2.13.