I am writing a RoR application that connects to a couchDB database using
The definition of my model is the following one:
class BdsDataAuthor < CouchRest::Model::Base
property :id, Integer
property :first_name, String
property :last_name, String
I would like to be able to get the list of the model columns, e.g., the
BdsDataAuthor.columns would be [id, first_name, last_name]
Is it possible? I saw that active_record provides this kind of method
(column_names), but since I am not using active_record...
A solution that I tried is to create a method in the model class (it
works but its not the "best" solution...):
columns = Array.new
columns << "id"
columns << "first_name"
columns << "last_name"
Any idea/suggestion to solve this problem?
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 email@example.com.
To unsubscribe from this group, send email to firstname.lastname@example.org.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.