We'll respond shortly.
It appears that DateTime object has some issues with doing math.
DateTime.now - 1.hour #raises TypeError DateTime.now - 3600 #works as expected 1.hour.class #Fixnum
Reading the CSS property
background-position in Chrome returns an invalid value. Don’t rely on it.
attr_accessiblebeing uses incorrectly. Remember to authorize your SSH keys.
not. It is highly recommended to always use the strict logical operators (
!) because the keywords
not) don’t have the same operator precedence.
bash, its better to use
$var. The curly-brace allows you to evaluate a variable with copy behind it. For example,
$varasdfevaluate differently because of the expected variable name.
Rails <3.1 has some gotchyas when using
class Note < ActiveRecord::Base has_many :contacts, inverse_of: :note end class Contact < ActiveRecord::Base belongs_to :note, touch: true #for triggering the note observer when the contact is updated end class NotObserver def after_touch(note) note.contacts # does not have the new attributes updated unless you specify the :inverse_of end end # Somewhere in the code... contact.update_attributes....
When table names are not namespaced on a class. What is the best way to work with this if we want table names to be namespaced?
class Foo::Bar < ActiveRecord::Base end > Foo::Bar.table_name == "bars" true