-
Notifications
You must be signed in to change notification settings - Fork 176
[#698] Fix issue queries on Ruby 1.9 #123
[#698] Fix issue queries on Ruby 1.9 #123
Conversation
Mmh, I'm not a huge fan on |
(and thanks for the submission :-) ) |
def values_for(field)
has_filter?(field) ? filters[field][:values] : nil
end We could write But this is only my opinion and there are probably some other options which I don't see. If you have another good idea or just another opinion, I will change it. |
The output of |
[#698] Fix single-value query atoms in issue queries on Ruby 1.9
This should fix the issue query problem described in #698.
Query#values_for(field)
returns an array which is passed to thetext_field_tag
helper method. This works on Ruby 1.8, because["test"].to_s
returnstest
, but on Ruby 1.9 it returns["test"]
.Using the first element of this array as parameter for
text_field_tag
seems better than relying onArray#to_s
.I did a quick test on Ruby 1.8.7 as well, it seems to work but it should be tested by someone else as well.