Flowdock

Notes posted by diabolist

RSS feed
February 4, 2013
0 thanks

Your scope cannot be called 'locked'

will cause intermittent problems of the type

undefined method 'locked' for #<Class:0x007fdab3025298>

Use something like ‘access_locked’ instead

June 30, 2009
3 thanks

Be careful with name of attribute writer

If restricting access to attributes you normally get code like

attr_accessible :foo,  

When using these nested attributes you end up with code like

attr_accessible :foo, :bar_attributes

Its very easy to leave of the _attributes suffix e.g

attr_accessible :foo, :bar

which will cause you all sorts of problems