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 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
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 On Mon, Jun 23, 2008 at 1:05 PM, Soutom <soutom.dhara-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > 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 > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
here i faced 1 problem.... undefined method `IndType='' for #<IndustryDetail > 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" <balumc...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> 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 > > On Mon, Jun 23, 2008 at 1:05 PM, Soutom <soutom.dh...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > 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--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
: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 On Mon, Jun 23, 2008 at 2:59 PM, Soutom <soutom.dhara-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > here i faced 1 problem.... > > undefined method `IndType='' for #<IndustryDetail > > > 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" <balumc...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > wrote: > > 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 > > > > On Mon, Jun 23, 2008 at 1:05 PM, Soutom <soutom.dh...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > 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 > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
thakx... again i am getting the Same error..e.i undefined method `IndType='' for #<IndustryDetail > i can''t understand wat to do....plese hepl me anydoby thanking you On Jun 23, 2:56 pm, "bala kishore pulicherla" <balumc...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> :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 > > On Mon, Jun 23, 2008 at 2:59 PM, Soutom <soutom.dh...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > here i faced 1 problem.... > > > undefined method `IndType='' for #<IndustryDetail > > > > 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" <balumc...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > > wrote: > > > 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 > > > > On Mon, Jun 23, 2008 at 1:05 PM, Soutom <soutom.dh...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > 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--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
thakx... again i am getting the Same error..e.i undefined method `IndType='' for #<IndustryDetail > i can''t understand wat to do....plese hepl me anydoby thanking you On Jun 23, 2:56 pm, "bala kishore pulicherla" <balumc...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> :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 > > On Mon, Jun 23, 2008 at 2:59 PM, Soutom <soutom.dh...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > here i faced 1 problem.... > > > undefined method `IndType='' for #<IndustryDetail > > > > 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" <balumc...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > > wrote: > > > 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 > > > > On Mon, Jun 23, 2008 at 1:05 PM, Soutom <soutom.dh...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > 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--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---