Thanks... I try this and its work ...
<% @obj= params[:category] @cat...@obj["catid"] @newrec= Category.new(:catid=>@catid) @newrec.save %> but when i try to do this like this.. its not working ... reason it is different because ... I have only controller for "Category" and i have model for "contact" but not controller .. willl it work with one single controller or not <% @obj= params[:contact] @na...@obj["name"] @newrec= Contact.new(:name=>@name) @newrec.save %> On Jun 23, 11:29 am, Amala Singh <[email protected]> wrote: > Philip has given good links. > > Basically all the database related stuffs are handled by the Active Record > class which is one > of the components of MVC(Model View Controller) architecture. > > Rails handles the create record stuff the same way traditional programming > languages such > as C++ via new constructor. > > If you want to add a new employee detail record the statement would be > > emp1 = emp.new(:name=>"amala", :website=>"http://www.tamil.net", :email=>" > [email protected]") > emp1.save > > or > > emp.new(:name=>"amala", :website=>"http://www.tamil.net", :email=>"[email protected] > ").save > > The fantastic feature of ROR is, mostly you dont need to know SQL query > language, or > you dont need to apply another Query language syntax. > > The code becomes fantastically simple and readable from the functional point > of view. > > On 23 June 2010 18:22, Philip Hallstrom <[email protected]> wrote: > > > > > > > On Jun 23, 2010, at 10:13 AM, Ali Imran wrote: > > > > In PHP from form > > > > we get values in POST OR GET > > > > than I use mysql_query(insert_value) > > > > what is its equal in ROR > > >http://guides.rails.info/getting_started.html > >http://guides.rails.info/active_record_querying.html > > > -philip > > > > -- > > > 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 [email protected]. > > > To unsubscribe from this group, send email to > > [email protected]<rubyonrails-talk%[email protected]> > > . > > > For more options, visit this group at > >http://groups.google.com/group/rubyonrails-talk?hl=en. > > > -- > > 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 [email protected]. > > To unsubscribe from this group, send email to > > [email protected]<rubyonrails-talk%[email protected]> > > . > > For more options, visit this group at > >http://groups.google.com/group/rubyonrails-talk?hl=en. > > -- > -- > Nandri(Thanks in Tamil), > Amala Singh -- 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 [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

