[Rails] Re: Assign value in ruby in html.erb file?

2010-11-05 Thread Tim Shaffer
On Nov 5, 3:25 pm, kishoj wrote: > Thank you all for your warm response!!! > I got the solution. Its something like below > > <% form_for [...@request, Comment.new] do |f| %> >           >             <%= f.hidden_field :request_id, :value => @request.id %> >           ...

[Rails] Re: Assign value in ruby in html.erb file?

2010-11-05 Thread kishoj
Thank you all for your warm response!!! I got the solution. Its something like below <% form_for [...@request, Comment.new] do |f| %> <%= f.hidden_field :request_id, :value => @request.id %> ...

[Rails] Re: Assign value in ruby in html.erb file?

2010-11-04 Thread Robert Walker
Kishoj B. wrote in post #959256: > How to assign the value in ruby commands in file with extension > html.erb for the following scenario: > Comment.request_id = id (of Request) > Note Comment and Request both are model There's so much wrong with what I see here I don't know where to start. You r