Forum: Ruby on Rails Rails Document must be more detailed otherwise...

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
988e5ee62c118b6d4a1fac630e69caf5?d=identicon&s=25 sharon lin (Guest)
on 2006-04-26 09:37
(Received via mailing list)
In java/c++ the method signature provide a good details on which
parameters
the method accept, but in rails the ability to send hash as parameters
make
it impossible
to know which parameters can be send.

This ability make the rails API doc a must to be full of details and not
supply partial examples of usage.

When for example I see *link_to_remote*(name, options = {}, html_options
=
{})
I would like to know exactly the keys which I can send for "options"
hash
parameter and not start figured it out by examples.

Any way, where can I find a good rails API other then
http://api.rubyonrails.com/ without missing details which cover the full
parameters for each method.(If exist)

Sharon
F5c118aaeb5bb7162db613a37e595be8?d=identicon&s=25 Mick Sharpe (micksharpe)
on 2006-04-26 10:06
Right now, the best source of information is Agile Web Development with
Rails, by Thomas Heinemeier Hansson, the inventor of Rails.

sharon lin wrote:
> In java/c++ the method signature provide a good details on which
> parameters
> the method accept, but in rails the ability to send hash as parameters
> make
> it impossible
> to know which parameters can be send.
>
> This ability make the rails API doc a must to be full of details and not
> supply partial examples of usage.
>
> When for example I see *link_to_remote*(name, options = {}, html_options
> =
> {})
> I would like to know exactly the keys which I can send for "options"
> hash
> parameter and not start figured it out by examples.
>
> Any way, where can I find a good rails API other then
> http://api.rubyonrails.com/ without missing details which cover the full
> parameters for each method.(If exist)
>
> Sharon
4daf0b71d5d9a3882e583c0e72eaf5dc?d=identicon&s=25 Alan Francis (Guest)
on 2006-04-26 10:19
Mick Sharpe wrote:
> Right now, the best source of information is Agile Web Development with
> Rails, by Thomas Heinemeier Hansson, the inventor of Rails.

Umm.... either you're joking (in which case, stoopid me), or you mean
Dave Thomas, and David Heinemeier Hansson (only one of which is the
inventor of Rails :)

Alan
F5c118aaeb5bb7162db613a37e595be8?d=identicon&s=25 Mick Sharpe (micksharpe)
on 2006-04-26 10:22
Oh Dear! I really shouldn't try to post anything when I've just got up
:o

I'l get another cup of coffee :D

Alan Francis wrote:
> Mick Sharpe wrote:
>> Right now, the best source of information is Agile Web Development with
>> Rails, by Thomas Heinemeier Hansson, the inventor of Rails.
>
> Umm.... either you're joking (in which case, stoopid me), or you mean
> Dave Thomas, and David Heinemeier Hansson (only one of which is the
> inventor of Rails :)
>
> Alan
882cc23c77c5c6d27613c51396a02a0d?d=identicon&s=25 Stephen Bartholomew (Guest)
on 2006-04-26 11:03
(Received via mailing list)
The Agile book is fanastic for learning Rails, but it doesn't give a
full API reference.

The reference on api.rubyonrails.com does seem to be fairly vague with
this kind of detail...

Anyone know if there is a more extensive API reference available or on
the way?

Steve
65c7c3dd95869e1430a260b049eabd51?d=identicon&s=25 Damian Legassick (dlg)
on 2006-04-26 11:54
there's also http://railsmanual.org

which has plenty of annotations to the API, mostly the older stuff, so
not yet anything for form_remote_tag. It's a great idea though, i hope
it's not stalled and continues to be updated.
Ad7805c9fcc1f13efc6ed11251a6c4d2?d=identicon&s=25 Alex Young (Guest)
on 2006-04-26 13:15
(Received via mailing list)
Stephen Bartholomew wrote:
> The Agile book is fanastic for learning Rails, but it doesn't give a
> full API reference.
>
> The reference on api.rubyonrails.com does seem to be fairly vague with
> this kind of detail...
I generally find that it's worth digging into the source for this sort
of thing.  Apart from finding out available options, I find I actually
learn a lot about how the whole thing fits together that way...

--
Alex
Ff5b4846b93008ffb2161805fa00af5f?d=identicon&s=25 Andrew Greenberg (Guest)
on 2006-04-26 13:27
(Received via mailing list)
Can you give examples of the vagueness.  I have found the api docs to
be the best source of information (and a good source at that), of how
Rails actually works.
Cd8c9864d88bcafc164d8fdb820cc451?d=identicon&s=25 Chris Richards (chris)
on 2006-04-26 13:31
Andrew Greenberg wrote:
> Can you give examples of the vagueness.  I have found the api docs to
> be the best source of information (and a good source at that), of how
> Rails actually works.

So have I.  Using the api and this forum i havnt yet come across a
problem i couldnt quickly resolve.
22ff4abebc9bfd299524bb14449d95dc?d=identicon&s=25 Erik van Oosten (Guest)
on 2006-04-26 13:36
(Received via mailing list)
The problem is that you need to know the terms that are used in the API.
You'll get used to it, but it takes some time.

       Erik.


Chris Richards schreef:
Ad7805c9fcc1f13efc6ed11251a6c4d2?d=identicon&s=25 Alex Young (Guest)
on 2006-04-26 14:11
(Received via mailing list)
Andrew Greenberg wrote:
> Can you give examples of the vagueness.
Yes, I can?

What does the block that you can pass to
ActionView::Helpers::FormTagHelper#form_tag() do, and why does it exist?

What are the possible valid options to
ActionView::Helpers::ScriptaculousHelper#sortable_element(), should the
keys be strings or symbols, and how do you represent booleans?

If you merge() two HashWithIndifferentAccesses, one with a string key
and the other with a symbol key that HWIA treats as the same, which
value gets kept?

Where is routing documented?

When you assert_routing, what format should the expected options hash
take, and how should you express '*foo' route elements?  What does the
extras hash do?

I'm not asking these questions because I want to know the answers, I'm
just pointing out some of the holes in the docs at api.rubyonrails.com
I've run into that have had me digging into the source.  I'm not
pointing them out to denigrate the Rails-core team in any way, but if I
didn't have access to the source, I certainly couldn't answer these
questions (and others like them) without jumping through a lot of hoops.

> I have found the api docs to
> be the best source of information (and a good source at that), of how
> Rails actually works.
It's good, but it's not great.  If I was much of a documentation writer,
I'd feel a little more confident about knocking up some doc-patches, but
I've got no idea if a) I'd have time to do it well, or b) I could do
them well enough for them to be accepted.
This topic is locked and can not be replied to.