soutom
1
i have 2 veriables…such as
industry = “Oil”
company = “XXXXX”
again i hv a table named industry_details…this table contain three
field i.e IndID, IndType,Ind_company
Here IndID auto-incriment…
So how can i insert this two data into the database’s table, named
industry_details
…If any one please help me i will b very much thankful to him/her
Thanking you…
Waitin for reply
soutom
2
In the create action in your controller u can try this
def create
your_code to insert into the first table
@industry_details = IndustryDetail.new(:IndType => params[:industry],
:ind_company => params[:company])
@industry_details.save
end
soutom
3
here i faced 1 problem…
undefined method `IndType=’ for #
this is teh main error…
but there is a field named IndType in IndustryDetail table…
So how can i solv this…
please help me…
thanking You
On Jun 23, 12:48 pm, “bala kishore pulicherla” [email protected]
soutom
4
:o
try like this if still any issue paste ur controler and view files
@industrydetails = IndustryDetail.new
@industrydetails.IndType = params[:industry]
@industrydetails.IndCompany=params[:company]
@industrydetails.save
soutom
5
thakx…
again i am getting the Same error…e.i
undefined method `IndType=’ for #
i can’t understand wat to do…plese hepl me anydoby
thanking you
On Jun 23, 2:56 pm, “bala kishore pulicherla” [email protected]
soutom
6
thakx…
again i am getting the Same error…e.i
undefined method `IndType=’ for #
i can’t understand wat to do…plese hepl me anydoby
thanking you
On Jun 23, 2:56 pm, “bala kishore pulicherla” [email protected]