I have this method which, ideally, I would like to work in such a way as
I pass in three string values, the first is the name of the object I am
trying to instantiate, the second a string value corresponding to an
attribute for that object and finally the value that the attribute gets
updated with.
The second half of this I have working, but instantiating an object from
a string value is not working.
I have done several searches and have come up with a solution that runs
the correct query but doesn’t seem to create an actual object. Here is
what I have:
Why complicate things with the conditions when you are trying to get
the basic find going? What if you just do @obj.find :first
Look in development.log to see what query is being run.
My original code actually did work, I was having issues with another bit
of the code which was confusing the whole matter. Thanks for the
responses. Hopefully this helps someone, thanks,