Closed jocubeit closed 12 years ago
Hi Dom, while I'm willing to provide support for Mercury Editor, I'm unable to provide support for everything else that's rails based. I understand that it can be difficult to determine where an error is coming from (server vs. javascript), but this one's rails.. You can assume this any time you see a HTTP 500 response.. You can also determine this from the "500 Internal Server Error" that you see at the top of that response.
It looks like you're building a form using a hash.. formtastic typically expects a model / openstruct that responds to specific methods. Try the baby steps the other way first -- making the models and such.. not using mercury.. then integrating it into mercury might be easier.
The code I provided above is only a slight alteration from your own example snippet in the gem:
mercury/app/views/mercury/snippets/example_options.html.erb
The only difference is the select input field. From what I can see this is valid Formtastic syntax. I may be using a hash but I've taken that from your own example, and since that works, I don't see why this doesn't.
I will take your advice and build a database-backed AR model and see if I get it to work that way.
Thanks for your time.
I tried the following:
And get the following error:
Ultimately I'd like the collection to come from database but I was trying to take baby steps and it failed here. How do I construct an option parameter that provides a drop down select? I have Formtastic included in the Gemfile and if I use just normal text box inputs it works fine.