routes:
map.listmovie 'movies/listmovie/:id', :controller => 'movies', :action
=> 'listmovie', :id => /\d+/
view:
<%= link_to '» »', 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