Skip to content

Commit

Permalink
Combing definitions of #disabled?
Browse files Browse the repository at this point in the history
  • Loading branch information
brynary committed Oct 14, 2008
1 parent d304564 commit 8c5216e
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions lib/webrat/core/field.rb
Expand Up @@ -47,7 +47,7 @@ def matches_alt?(alt)
end

def disabled?
!@element["disabled"].nil? && @element["disabled"] != 'false'
@element.attributes.has_key?("disabled") && @element["disabled"] != 'false'
end

def raise_error_if_disabled
Expand All @@ -60,10 +60,6 @@ def to_param
param_parser.parse_query_parameters("#{name}=#{value}")
end

def disabled?
@element.attributes.has_key? "disabled"
end

def set(value)
@value = value
end
Expand Down

0 comments on commit 8c5216e

Please sign in to comment.