Last night, I upgraded one of my rails apps to 1.1. This app uses Markaby exclusively for its'' views, and once I checked out the latest revisiong of Markaby (r33), everything was working fine except for one thing: select_tag(''province_id'', options_from_collection_for_select(@provinces, "id", "name")) Now returns this (as you see it is spitting out the options both before and after the opening select tag): <option value="2">Alberta</option><br /> <option value="1">British Columbia</option><br /> <option value="5">Manitoba</option><br /> <option value="8">New Brunswick</option><br /> <option value="9">Newfoundland</option><br /> <option value="12">Northwest Territories</option><br /> <option value="7">Nova Scotia</option><br /> <option value="13">Nunavut</option><br /> <option value="6">Ontario</option><br /> <option value="10">Prince Edward Island</option><br /> <option value="3">Qu?bec</option><br /> <option value="4">Saskatchewan</option><br /> <option value="11">Yukon Territory</option><select id="province_id" name="province_id"><option value="2">Alberta</option><br /> <option value="1">British Columbia</option><br /> <option value="5">Manitoba</option><br /> <option value="8">New Brunswick</option><br /> <option value="9">Newfoundland</option><br /> <option value="12">Northwest Territories</option><br /> <option value="7">Nova Scotia</option><br /> <option value="13">Nunavut</option><br /> <option value="6">Ontario</option><br /> <option value="10">Prince Edward Island</option><br /> <option value="3">Qu?bec</option><br /> <option value="4">Saskatchewan</option><br /> <option value="11">Yukon Territory</option></select> Any Markaby users seeing this behavior? Using the same tag in an rhtml view works as expected. -- Posted via http://www.ruby-forum.com/.
Ok, let''s try that again: <option value="2">Alberta</option> <option value="1">British Columbia</option> <option value="5">Manitoba</option> <option value="8">New Brunswick</option> <option value="9">Newfoundland</option> <option value="12">Northwest Territories</option> <option value="7">Nova Scotia</option> <option value="13">Nunavut</option> <option value="6">Ontario</option> <option value="10">Prince Edward Island</option> <option value="3">Qu?bec</option> <option value="4">Saskatchewan</option> <option value="11">Yukon Territory</option><select id="province_id" name="province_id"><option value="2">Alberta</option> <option value="1">British Columbia</option> <option value="5">Manitoba</option> <option value="8">New Brunswick</option> <option value="9">Newfoundland</option> <option value="12">Northwest Territories</option> <option value="7">Nova Scotia</option> <option value="13">Nunavut</option> <option value="6">Ontario</option> <option value="10">Prince Edward Island</option> <option value="3">Qu?bec</option> <option value="4">Saskatchewan</option> <option value="11">Yukon Territory</option></select> -- Posted via http://www.ruby-forum.com/.
Just an update to this. This appears to be an issue with r33 of Markaby in general, and appears in both Rails 1.1 and 1.0. I was able to get things working well by exporting the tagged version 0.3 of Markaby into my markaby folder in vendor/plugins. svn export http://code.whytheluckystiff.net/svn/markaby/tags/0.3/ vendor/plugins/markaby/ --force So far, so good.... Brad Daily wrote:> Last night, I upgraded one of my rails apps to 1.1. This app uses > Markaby exclusively for its'' views, and once I checked out the latest > revisiong of Markaby (r33), everything was working fine except for one > thing: > > select_tag(''province_id'', options_from_collection_for_select(@provinces, > "id", "name")) > > Now returns this (as you see it is spitting out the options both before > and after the opening select tag): > > <option value="2">Alberta</option><br /> > <option value="1">British Columbia</option><br /> > <option value="5">Manitoba</option><br /> > <option value="8">New Brunswick</option><br /> > <option value="9">Newfoundland</option><br /> > <option value="12">Northwest Territories</option><br /> > <option value="7">Nova Scotia</option><br /> > <option value="13">Nunavut</option><br /> > <option value="6">Ontario</option><br /> > <option value="10">Prince Edward Island</option><br /> > <option value="3">Qu?bec</option><br /> > <option value="4">Saskatchewan</option><br /> > <option value="11">Yukon Territory</option><select > id="province_id" name="province_id"><option > value="2">Alberta</option><br /> > <option value="1">British Columbia</option><br /> > <option value="5">Manitoba</option><br /> > <option value="8">New Brunswick</option><br /> > <option value="9">Newfoundland</option><br /> > <option value="12">Northwest Territories</option><br /> > <option value="7">Nova Scotia</option><br /> > <option value="13">Nunavut</option><br /> > <option value="6">Ontario</option><br /> > <option value="10">Prince Edward Island</option><br /> > <option value="3">Qu?bec</option><br /> > <option value="4">Saskatchewan</option><br /> > <option value="11">Yukon Territory</option></select> > > Any Markaby users seeing this behavior? Using the same tag in an rhtml > view works as expected.-- Posted via http://www.ruby-forum.com/.
Well after some help from _why, problem solved. Any helpers are automatically output to the stream, so you have to change the call to: select_tag(''province_id'', @helpers.options_from_collection_for_select(@provinces, "id", "name")) Brad Daily wrote:>> Last night, I upgraded one of my rails apps to 1.1. This app uses >> Markaby exclusively for its'' views, and once I checked out the latest >> revisiong of Markaby (r33), everything was working fine except for one >> thing: >> >> select_tag(''province_id'', options_from_collection_for_select(@provinces, >> "id", "name"))-- Posted via http://www.ruby-forum.com/.