It's a default value.
In languages that don't have default values, you _always_ have to pass in an
argument. For example, if you defined it this way (or if Ruby didn't support
them...)
def render_show_actions(resource, actions, options)
When you called the function, you'd have to do this
render_show_actions @resource, ["action 1", "action 2] , {}
instead of this
render_show_actions @resource, ["action 1", "action 2]
... which is much nicer looking, and less typing.
--
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 protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.