Ruby on Rails
Friday, October 4, 2019
On Thursday, September 26, 2019 at 4:28:41 PM UTC-4, hasan...@gmail.com wrote:
[response inline]--On Thu, 26 Sep 2019 at 13:17, fugee ohu <fuge...@gmail.com> wrote:What data type do you suggest for value column?There were types suggested by the original responder. However, worrying about column types is an instance of premature optimization.Get the basic site working, and then optimize, once you have determined your performance needs. -- HIf you wish to request my time, please do so using bit.ly/hd1AppointmentRequest .Si vous voudrais faire connnaisance, allez a bit.ly/hd1AppointmentRequest.Envoye de mon portable
has_many :item_properties, through: :item_item_properties
how can i put fields for item_properties on a new item form
how can i put fields for item_properties on a new item form
for item_type="Books" I have a property called year
it's the first iteration the loop below comes across
<% ItemProperty.where(item_type: params[:item_type]).each do |ip| %>
<div class="field">
<%= f.label "#{ip.name}" %>
<%= f.text_area "#{ip.name}".downcase.to_sym %>
</div>
<% end %>
and returns this error:
<div class="field">
<%= f.label "#{ip.name}" %>
<%= f.text_area "#{ip.name}".downcase.to_sym %>
</div>
<% end %>
and returns this error:
undefined method `year' for #<Item:0x007fad724a6f38>
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/dc247899-9ef0-4c67-9a02-4f47c215e4d3%40googlegroups.com.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment