...
<div class='inquiries'>
<%= render '/refinery/inquiries/inquiries/form', inquiry: @inquiry %>
</div>
...
First argument in form cannot contain nil or be empty
Extracted source (around line #1):
1
2
3
4
<%= form_for [refinery, :inquiries, inquiry] do |f| %>
<%= render :partial => "/refinery/admin/error_messages",
:locals => {
:object => inquiry,
Rails.application.routes.draw do
mount Refinery::Core::Engine, at: '/'
end
Hmm.. Unfortunately no. Ill briefly describe what I have been doing though.
I spent quite some time trying to just install and get refinerycms working on my machine (Mac Yosemite) only to find out I was using the wrong versions.
In that process, I uninstalled rbenv, installed rvm, then switched back to rbenv.
After all that, I managed to get refinerycms working, and went through a lot of 'rails g' and 'rails d' to get the form to work using a model and then decided not to use a model.
I messed around with the routing, adding lines for the form_tag that does not use a model, only to find I should have use the 'prepend' method.
I finally chanced upon the previous post of the guy wanting to use the inquiry form as a partial, and followed his code which taught me that I should look into the source code when I can't find any tutorials or guides online.
Heh, yeah it's been a long two days for me.
So that's like my process. Do you suggest I redo everything from scratch? I might have messed up something along way.
That seems fine, it just seems like it's not understanding the refinery routing helper for some reason. Do you have steps that we can use to reproduce this in a basic rails application, perchance?
--
You received this message because you are subscribed to the "Refinery CMS" Google Group.
To post to this group, send email to refine...@googlegroups.com
http://www.refinerycms.com
---
You received this message because you are subscribed to the Google Groups "Refinery CMS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to refinery-cms...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/refinery-cms/EAEE4B1403E44414AF926356C91F2CEB%40gmail.com.
For more options, visit https://groups.google.com/d/optout.
Thanks Philip!
I'll do that!
--
You received this message because you are subscribed to the "Refinery CMS" Google Group.
To post to this group, send email to refine...@googlegroups.com
http://www.refinerycms.com
---
You received this message because you are subscribed to the Google Groups "Refinery CMS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to refinery-cms...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/refinery-cms/5A0988BD511A4E7785999E7C32ACB095%40gmail.com.
Refinery::PagesController.class_eval do
before_filter :newForm
def newForm()
@inquiry = Inquiry.new
end
end
...
<div id="contact-form">
<% content_for :body do %>
<%= raw @page.content_for(Refinery::Pages.default_parts.first.to_sym) if Refinery::Pages.default_parts.any? %>
<div class='inquiries'>
<%= render '/refinery/inquiries/inquiries/form', inquiry: @inquiry %>
</div>
<%end%>
...