> ...
> <% if @hotel.categories.any? %>
>   <% @hotel.ratings.each do |rating| %>
>     <% fields_for @hotel.ratings do |rating_form| %>
>     <li><% rating.category.name %> <% rating_form.text_field :rating
> %></li>
>    <% end %>
> <% end %>
> ...

As you told you are trying to edit hotel information. So I think you
should have like following
        <% form_for(@hotel) do |form| %>
        <% end %>

and inside this you might use like
        <% form.fields_for :ratings do |rating_field| %>
            # print rating fields
        <% end %>

If the above doesnt help you, would you please provide more insight
about what and how you are actually want to print ratings in hotel
edit form?

Thank you.

Samiron paul
http://samironpaul.blogspot.com
http://www.code71.com

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to