Quantcast
Channel: Notes posted by gabeodess
Browsing latest articles
Browse All 2 View Live

Disable STI (ActiveRecord::Base#inheritance_column)

I had to add “self.inheritance_column” as opposed to simply “inheritance_column” to get this to work.Code example class MyModel<ActiveRecord::Base# disable STIself.inheritance_column=:_type_disabledend

View Article



The :path option (ActionDispatch::Routing::Mapper::Resources#resources)

The path option will actually set the path and not the prefix I have found in Rails 3.0.5.Exampleresources:my_reports,:path=>'my-reports'All actions for this resource will now be at /my-reports.

View Article
Browsing latest articles
Browse All 2 View Live


Latest Images