Glad You're Ready. Let's Get Started!

Let us know how we can contact you.

Thank you!

We'll respond shortly.

SF Standup 06/16/2011: Instantiate Paperclip model?

Ask for Help

“I have paperclip columns from a custom sql query. Is there any way to instantiate the associated objects just to generate the paperclip urls for those attachments?”

Calling new on the base class and passing in the data does not seem to work.

Interesting Things

The script tab of the webkit inspector has breakpoints for all kinds of events. Is a click event not behaving like you think it should? You can easily check a box and have all click events open the debugger.

  1. Jacob Maine says:

    If you’re using `select_all` for the custom SQL query, try switching to `find_by_sql`. It instantiates objects instead of returning arrays of attribute hashes.

Post a Comment

Your Information (Name required. Email address will not be displayed with comment.)

* Copy This Password *

* Type Or Paste Password Here *