Forum: Ruby on Rails what is the :or parameter in a submit_tag ?

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.
Kad K. (Guest)
on 2007-06-26 19:15
I read the following tag in teh Beast example

<%= submit_tag'Login',  :or => link_to_function('forgotten password',
"$('reset-password').toggle();") %>

I understand the link_to_function, but what is this :or parameter used
for ?
the link doesn't appear, so it cannot be used...

thanks for your lights

kad
Kad K. (Guest)
on 2007-06-26 19:25
Kad K. wrote:
> I read the following tag in teh Beast example
>
> <%= submit_tag'Login',  :or => link_to_function('forgotten password',
> "$('reset-password').toggle();") %>
>
> I understand the link_to_function, but what is this :or parameter used
> for ?
> the link doesn't appear, so it cannot be used...
>
> thanks for your lights
>
> kad

....  I believe it should be cut in two.. but this is the actual code in
the login form....
which generates

<p><input name="commit" type="submit" value="Login" /><span
class='button_or'>or <a href="#" onclick="$('reset-password').toggle();;
return false;">reset password</a></span></p>

don' understand why ?
Rick O. (Guest)
on 2007-06-26 19:43
(Received via mailing list)
On 6/26/07, Kad K. <removed_email_address@domain.invalid> wrote:
> >
> return false;">reset password</a></span></p>
>
> don' understand why ?

It's a custom mod josh made to #submit_tag in:

http://svn.techno-weenie.net/projects/beast/trunk/...


--
Rick O.
http://lighthouseapp.com
http://weblog.techno-weenie.net
http://mephistoblog.com
Kad K. (Guest)
on 2007-06-27 01:16
Rick O. wrote:
> On 6/26/07, Kad K. <removed_email_address@domain.invalid> wrote:
>> >
>> return false;">reset password</a></span></p>
>>
>> don' understand why ?
>
> It's a custom mod josh made to #submit_tag in:
>
> http://svn.techno-weenie.net/projects/beast/trunk/...
>
>
> --
> Rick O.
> http://lighthouseapp.com
> http://weblog.techno-weenie.net
> http://mephistoblog.com

Thanks Rick .. I forgot to look into this major helper....  ;-))
this app was my 'tutorial' in moving to RESTFul  app... I was
concentrated on RESTFul aspect and forgot the Rails basics.....
This topic is locked and can not be replied to.