Displaying 3 results from an estimated 3 matches for "j2ee_satya".
2006 Feb 16
9
association not inserted automatically.
Hello,
I am trying to write a sample application.
I have
class LineItem< ActiveRecord::Base
belongs_to : order
end
&&
class Order < ActiveRecord::Base
has_one :line_item
end
Now in the controller i am trying :
def add
@ord = Order.new(params[:ord])
@ord.line_item = LineItem.new(params[:lineitem])
if @ord.save
redirect_to :action => ''list''
else
render
2006 Apr 25
3
how to get the count/index of the current row ?
I have a partial to which i pass a collection. That views name is _row.
So row.name, row.ssn gives me the details of each object in the
collection,
But i need to display
1. name 123456798
2. name1 234567890
how to get that Index ??? or count or whatever in that partial ??
please help.
--
Posted via http://www.ruby-forum.com/.
2006 Feb 13
2
how to find the helpers code ?
Hello,
i have the application set up on my radrails. I was looking at the view
generated by scaffold and i see a bunch of names, after looking up
internet i found that they are helpers and generate the HTML for us.
Now, i wanted to look at the helper code for start_form_tag, so that
based on that i could write some of my own helpers in my helper
classes... but i could not find the code