Re: disabled button

Shandy Nantz
Wed, 21 Oct 2009 16:08:14 -0000

> I''m using link_to with image_submit_tag justly to avoid using a
form.
> People often use link_to with image_tag for image links, and since both
> HTML anchors and imgs can''t be disabled, I thought of using that.
Note
> that I''m a starter too, and if this is not the better approach
please
> let me know.

I''m not sure if this will help, but here is the url to all the link
rails helpers, one of them is a link_to_if which creates a link if a
condition is met.

http://api.rubyonrails.org/classes/ActionView/Helpers/UrlHelper.html

Not sure if this helps at all, but it might be useful to create a link
IF a row is select and do something else if it is not. Also, it looks
like you can have the "disabled" attribute for a link but I was unable
to locate an example of it in use but I would imagine it would an
html_option.