Colin Law wrote in post #1027233: > On 18 October 2011 16:25, prasetya utama <li...@ruby-forum.com> wrote: >> yes i want to generate model, but the table has been created in >> databases. And i want generate that table :) > > I asked last time that you don't top post, it makes it difficult to > follow the thread, > insert your reply at appropriate points in previous message. This > time you have not even quoted the previous message so anyone reading > this will have not idea what you are talking about without looking > back through the thread. > > You say that you want to generate just the model, so you do not want > to generate the full scaffold. As I said previously there is no need > to "generate" the model, just create a file models/your_model.rb with > the class definition in as I showed in my first reply. Rails will > automatically pick up the fields from the database at run time. > > I think you might benefit from reading through the Rails Guides and > from working through some tutorials. railstutorial.org is good and > free to use online. Make sure that you have the version of rails to > match the tutorial you are using. > > Colin
Thanks colin, for your advice :) and your coment -- Posted via http://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.