0

I am creating an application form and wanting to embed/render a long text(static html)page "inside" the form as a scrolling container. I've saved the partial in /app/views/layouts directory as _membershipAgreementV_1.html.erb

The partial renders just fine outside of the form_for block but when inside the page/form fails to load.

Snippet from the partial _membershipAgreementV_1.html.erb

<div class="MembershipAgreement">
    <div class="container">
        <div style="height: 400px; overflow: auto; padding: 5px">
    <h2>Eligibility and Membership.</h2>

(LLLLoooonnnggggg that is to long to put in the form imo) . . .

Snippet from the new_app view

<div class="row">
   <div class="span6 offset3">
      <%= form_for (@member), :url => {:action => "approve"}, :html => {:method => "put"} do |f| %>
.
.
.
        <%= f.label :eMail, "eMail address" %>
        <%= f.text_field :eMail %>

        <%= render 'layouts/membershipAgreement_V1'%>

        <%= f.label :releaseIP, "IP Address you are connecting from" %>
        <%= f.text_field :releaseIP, :value => request.remote_ip , :readonly => true%>
.
.
.

The error given when the site is

Missing partial layouts/_membershipAgreement_V1 with {:locale=>[:en], :formats=>[:html], :variants=>[], :handlers=>[:erb, :builder, :raw, :ruby, :jbuilder, :coffee]}. Searched in: * "/home/stephen/Desktop/Projects/club_app/app/views"

Following other QandAs on embedding partials in forms all I can find is embedding form partials into another form and linking data/namespaces together but there is nothing to 'link'/transfer between the form and the 'static' html inside the scroll box. What/how do I get the partial to render inside the form?

Thanks

Stephen
  • 13
  • 2
  • Try changing your file name to `membership_agreement_v1.html.erb` and use as `<%= render 'layouts/membership_agreement_v1'%>` – Pavan May 16 '14 at 18:09
  • Still receives the error with or without the leading underscore. Also tried changing location of file to the members directory (directory where all the related views are located). – Stephen May 16 '14 at 19:15

0 Answers0