Re: [Rails] Re: its easy but i forgot all

2010-09-06 Thread Colin Law
On 6 September 2010 05:30, rajeevsharma86 wrote: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >I have two modelds >1. loan model belongs_to :borrower > >2. borrower model has_many:loans > > In my borrower Show method i wrote > > <%= link_to 'Request New Loan', :c

Re: [Rails] Re: its easy but i forgot all

2010-09-05 Thread rajeevsharma86
I have two modelds 1. loan model belongs_to :borrower 2. borrower model has_many:loans In my borrower Show method i wrote <%= link_to 'Request New Loan', :controller => 'loans', :action => 'new', :id => @borrower.id %> my loans_controller have this def new @borrower = Borrower.f

[Rails] Re: its easy but i forgot all

2010-09-04 Thread Luke Cowell
If the issue is in the create action please provide the corresponding code. Model code would be helpful too. Luke On Sep 4, 5:51 am, ashu wrote: > my models > > borrower    -   has_many :loans > loan          -    belongs_to :borrower > > my loans _controller > >   def new >     @borrowe