Get fields in a generator

I am making a generator, and I want make a partial form with all columns
the of table. How made for get count of columns, and how made for get
each columns, and also to show the name of column?

You can just say:

YourModel.content_columns each do |c|

end

nolifetillpleather wrote:

You can just say:

YourModel.content_columns each do |c|

end

But I not have a MyModel, my model will created with the generator. How
I make in a generator?

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs