Am 08.11.2009 um 20:29 schrieb Nicolai Constantin Reuschling:

Ja das sieht schon sehr danach aus ....
elegant und railslike..

Werde es bald mal testen ob ich das so hinbekomme...

Danke für die Anregung

Hallo Werner,

wie schaut's mit dem hier aus:

class Thing < AR
 belongs_to :user
end

class User < AR
 has_many :things
end

class ThingsController

 def index
   @things = current_user.things
 end

 def show
   @thing = current_user.things.find(params[:id])
 end
end

So verstehe ich das Problem (und die Lösung).

Viele Grüße
Nicolai
_______________________________________________
rubyonrails-ug mailing list
rubyonrails-ug@headflash.com
http://mailman.headflash.com/listinfo/rubyonrails-ug


_______________________________________________
rubyonrails-ug mailing list
rubyonrails-ug@headflash.com
http://mailman.headflash.com/listinfo/rubyonrails-ug

Antwort per Email an