Ok, that's clear now.
>
> Do you use pastie (http://pastie.org/) or gist (https://gist.github.com/)?
> If yes, can you paste following on any of them and reply with link?
> No, I am not using that..
>



> #models
> User
>
id
name
address
culture_id

Picture
>
id
image(binary)
phrase_id
culture_id

Culture
id
phrase_id



>
> #controllers
> UsersController
>

 def index
    @user= User.all
    @pic= []
    @user.each do |p|
    @pic<< Picture.where(:phrase_id => :route , :culture_id =>
p.culture_id).first
     @pic.compact!

     end
  end




  def show
    @user= User.find_by_id(params[:id])
  end

end


>
> #views
> users/index
>

 <td><%= image_tag url_for(:controller => "/users", :action => "index"),
:width => "25px", :height => "25px"%></td>

-- 
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