Can''t seem to find the Column class API documentation. For example, content_columns returns a list of Column objects, but where is the doc for this Column class? Thanks in advance, Don McClean --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Hi Don, Don.Mc wrote:> > Can''t seem to find the Column class API documentation. > For example, content_columns returns a list of Column > objects, but where is the doc for this Column class?Don''t know if this will help, but I had a similar situation recently and someone suggested I use script\console to find out what I wanted to know. In my case I wanted to know what methods were valid on a field in my Actors table. So after starting script\console...>> require ''Actor'' >> Actor.columns.methodsreturns the methods on all the fields.>> Actor.columns_hash[''field_name''].methodsreturns the methods on the specified field>> Actor.columns_hash[''field_name''].limit # using one method as an examplereturns the size of the specified field. etc. HTH, Bill --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Bill, Thanks, that is a good idea. Don On Mar 22, 12:48 pm, "Bill Walton" <bill.wal...-xwVYE8SWAR3R7s880joybQ@public.gmane.org> wrote:> Hi Don, > > Don.Mc wrote: > > > Can''t seem to find the Column class API documentation. > > For example, content_columns returns a list of Column > > objects, but where is the doc for this Column class? > > Don''t know if this will help, but I had a similar situation recently and > someone suggested I use script\console to find out what I wanted to know. > In my case I wanted to know what methods were valid on a field in my Actors > table. So after starting script\console... > > >> require ''Actor'' > >> Actor.columns.methods > > returns the methods on all the fields. > > >> Actor.columns_hash[''field_name''].methods > > returns the methods on the specified field > > >> Actor.columns_hash[''field_name''].limit # using one method as an example > > returns the size of the specified field. > > etc. > > HTH, > Bill--~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Don Mc wrote:> Can''t seem to find the Column class API documentation. For example, > content_columns > returns a list of Column objects, but where is the doc for this Column > class? > > Thanks in advance, > Don McCleanI think its this: http://api.rubyonrails.com/classes/ActiveRecord/ConnectionAdapters/Column.html In irb prompt try: SomeModel.content_columns.first.class and see what you get. -- 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Thanks, thats it! Don On Mar 23, 12:52 am, Alex Wayne <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> DonMcwrote: > > Can''t seem to find the Column class API documentation. For example, > > content_columns > > returns a list of Column objects, but where is the doc for this Column > > class? > > > Thanks in advance, > >DonMcClean > > I think its this:http://api.rubyonrails.com/classes/ActiveRecord/ConnectionAdapters/Co... > > In irb prompt try: > > SomeModel.content_columns.first.class > > and see what you get. > > -- > 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---