-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

schau dir sonst das hier noch an:
http://media.railscasts.com/videos/121_non_active_record_model.mov


Am 01.10.2008 um 21:13 schrieb Werner Laude:

routes:
map.listmovie 'movies/listmovie/:id', :controller => 'movies', :action => 'listmovie', :id => /\d+/

view:
<%= link_to '&raquo; &raquo;', listmovie_path(m.letter) %>

controller:
def listmovie
   @movies = Movie.find_by_first_letter(params[:id])

model:
def self.find_by_first_letter(letter)
      find(:all, :conditions => ['ucase(left(name, 1)) = ? ', letter])
  end


link:
http://localhost:3001/movies/listmovie/a


bekomme immer:
No route matches "/listmovie/a" with {:method=>:get}
Muß ich die route irgendwie anders schreiben oder was ist da faul?
Movie.find(.all) klappt..
Danke für Hinweise.


_______________________________________________
rubyonrails-ug mailing list
[email protected]
http://mailman.headflash.com/mailman/listinfo/rubyonrails-ug

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)

iD8DBQFI48/8s/WwCK0ZZEARAv08AKCmIM1urDSZf06zS58JKMf/qfeaUACghhjv
Rv3SosQg02ds0YfSEdEiQqc=
=Fimw
-----END PGP SIGNATURE-----
_______________________________________________
rubyonrails-ug mailing list
[email protected]
http://mailman.headflash.com/mailman/listinfo/rubyonrails-ug

Antwort per Email an