Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

"find (ActiveRecord::Base)"

#2964

Hey guys,
I was having a look at the the "find (ActiveRecord::Base)" action. Under paramters -> :select it is stated:

:select - By default, this is "*" as in "SELECT * FROM", but can be changed if you, for example, want to do a join but not include the joined columns. Takes a string with the SELECT SQL fragment (e.g. "id, name").

I used this method earlier today on a model together with some joins and found that the default when used on a model is "Model.*" and therefore doesn't include joined columns by default. I had to add a :select => "*" to get to these.

I think the API should state this for clarity.

Thanks,
Julian

PS: first ticket here -> feel free to correct me if I do something wrong

Reported by Julian · July 28th, 2009 @ 03:03 PM

State: wontfix
Milestone: none
Assigned to: nobody
Importance: none

Activity

  1. Pratik
    Pratik
    • State changed from new to wontfix

    Hey Julian,

    Please check http://guides.rubyonrails.org/contributing_to_rails.html#contributi... for documentation contributions.

    Thanks!

    August 8th, 2009 @ 02:36 PM