Home Random Memory location in rails form app
Reply: 1

Random Memory location in rails form app

cdrrazan
1#
cdrrazan Published in 2018-02-14 10:06:13Z

I am trying to create form in rails and in one of attributes placeholder i am getting like some placeholder value #<Arel::SelectManager:0x007f7c743abb58>.

The placeholder "Project" in that attribute seem to be visible only when such text is removed manually.

Is this some kind of bug or any syntax mistake?

Below is the code where i am seeing error.

<p>
  <%= f.label :Project %>
  <%= f.text_field :project, placeholder: "Project" %>
  <button type="button" class="add_field_button">Add More Record</button>
</p>
Sergio Tulentsev
2#
Sergio Tulentsev Reply to 2018-02-14 10:52:44Z

Actually project variable you are passing to form text_field is an object not text or string.

suppose you have name attribute in project Model, so do something like.

<%= f.text_field :project.name, placeholder: "Project" %>

Make sure you are passing a text or string value to f.text_field

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.304782 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO