search for: jaquet

Displaying 2 results from an estimated 2 matches for "jaquet".

Did you mean: paquet
2008 Feb 29
3
How to DRY REST admin path in URLs?
Hi everyone... For almost all of my objects I put a series of classic REST admin links in views. For example, for a ''user'', I have <%= link_to "Show", user_path(user) %> <%= link_to "Edit", edit_user_path(user) %> <%= link_to "Destroy", user_path(user), :confirm => "Are you sure", :method => :delete %> I am tired
2008 Feb 28
2
REST nested routes with has_one
Hi everyone, I have 2 models: class User < ActiveRecord::Base has_one :laboratory, :foreign_key => "pi_id" end class Laboratory < ActiveRecord::Base belongs_to :pi, :class_name => "User", :foreign_key => "pi_id" end I set the following routes (in routes.rb): map.resources :laboratories map.resources :users, :has_one => :laboratory All the