On Tue, Sep 24, 2013 at 11:58 PM, Roman <[email protected]> wrote:
Hi, > just stumbled upon a need to raise a NotFound exception when the object > doesn't have a necessary association. So instead of writing > `Company.find(current_user.company_id)` or `current_user.company || raise > AR::RecordNotFound`, maybe it would be nicer to just say > `current_user.company!`. What do you think? > Do you have a real use case to share for that need? -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/rubyonrails-core. For more options, visit https://groups.google.com/groups/opt_out.
