Getting parent record

Hello all,

I’ve got a model - Property which belongs_to Seller. In my controller, I have a variable @property which is a Property record - @property = Property.find_by_permalink(params[:id])

I’m now trying to get the seller fields - if I do a <%= @property.seller.id %> I get the following -

Called id for nil, which would mistakenly be 4 – if you really wanted the id of nil, use object_id

Extracted source (around line #4):

1:

2:

<%= @property.property_profile.title %>

3:

<%= @property.property_profile.description %>

4: <%= @property.seller.id %>

5: <% for image in @property.property_images %>

6: <%= image_tag url_for_file_column(image, “filename”, “medium”) %>

7: <% end %>

Any suggestions?

Cheers,

Alastair

Well, I appreciate the fact that you are changing the list provider so the service will be better.

I also appreciate much the fact that you are getting sepparate lists for sepparate issues. I specially appreciate to see that the project is alive and learning lessons from recent experiences, as I can see from you creating the security list for better spreading the word when necessary.

Considering everything I'm receiving from you -totally for free and just for the sake of spreading the knowledge- and comparing it again the small inconvenience of not being foretold that the list was moving, my balance falls on the side of being thankful to the team. And after seeing what's going on today I was thinking it would be nice to let you know.

*THANKS!*

javier

p.s. yeah, maybe there was a better way of migrating but... life is not perfect after all. I'm sure some lessons will be learnt from this experience too and next time the movement will be smoother. Surely after some tweaking the list will be as good as ever.At the end of the day what counts for me is that we have an excellent tool for sharing the wisdom throughout the community.