I have a model User and when I create one, I want to pragmatically setup some API keys and what not, specifically:
In my edit action of my employees_controller I have this line of code: #Employee#edit 69: if @employee.user.person.addresses.length == 0
For a Rails 3.0 Todo app, I have a Tasks model with a Status field. What\'s the best way to store the Status field data (field type) and still display a human-readable version in a view (HTML table)?
Let me explain my problem: I have 2 models: class User < AR::Base has_many :contacts end class Contact < AR::Base
I\'ve nearly finished rewriting (with some new features) my Symfony (left a bit bad taste in mounth) application into Rails. There is some amount of data which I need to import from my old application
Rails has a has_one :through association that helps set up a one-to-one association with a third model by going through a second model. What is the real use of that besides making a开发者_Python百科 s