If you don't want to create a model you can use straight SQL with ActiveRecord::Base.connection.execute. I would create the model, though. It would be the hell of a lot simpler and cleaner.
On Sep 29, 5:37 am, Tushar Gandhi <rails-mailing-l...@andreas-s.net> wrote: > Hi, > I have a question that Is it possible to add record into the database > table without adding the model for that? > > E.g. I have a table customers. And I haven't created a model for that. > Can I add a record into that table bu doing "cust=Custome.new cust.save" > > Any help appreciated. > Thanks, > Tushar > -- > Posted viahttp://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---