aash dhariya wrote in post #1066730:
> I think you are using gsub on symbol which is the reason you are thrown
> this error. Pass the string to the function instead of symbol:
> <%= dropdown_tags "sort_criteria", 'Select Criteria',
> %w(Category Status Amount-High Amount-Low) %>
>
> On Sat, Jun 30, 2012 at 3:52 AM, Eastside Developer
> <lists@ruby-forum.com>wrote:
>
>> ) and placed it in /lib
>> <% require 'jquery_dropdown_helper' %>
>>
>> You received this message because you are subscribed to the Google Groups
>> "Ruby on Rails: Talk" group.
>> To post to this group, send email to rubyonrails-talk@googlegroups.com.
>> To unsubscribe from this group, send email to
>> rubyonrails-talk+unsubscribe@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/rubyonrails-talk?hl=en-US.
>>
>>
>
>
> --
> Thanks,
> Aash
Yes, gsub as a method is not going to act on a symbol. However, when I
switch to string, instead of seeing a dropdown menu, I see the
following: note that I changed the name of the hidden tag). Any pointers
to dropdown menu examples that do not force to do a deep dive into
JQuery?
<a id="admin_menu_selection-selector" class="fg-button
fg-button-icon-right ui-widget ui-corner-all ui-state-default"
href="#admin_menu_selection-selector-items" tabindex="0" > <span
class="ui-icon ui-icon-triangle-1-s"></span>Admin</a> <div
id="admin_menu_selection-selector-items" class="hidden" ><ul><li><a
href="#" value="Category">Category</a></li> <li><a href="#"
value="Status">Status</a></li> <li><a href="#"
value="Amount-High">Amount-High</a></li> <li><a href="#"
value="Amount-Low">Amount-Low</a></li></ul></div> <script
type="text/javascript"> jQuery('#admin_menu_selection-selector').menu({
content: jQuery('#admin_menu_selection-selector-items').html(), flyOut:
true, posX: 'left', posY: 'bottom', directionV: 'down', maxHeight: 400,
detectV: false, showSpeed: 350, chooseItem: function(selection) {
jQuery('#admin_menu_selection-selector').html( '<span class="ui-icon
ui-icon-triangle-1-s"></span>' + jQuery(selection).text() ); var vid =
jQuery(selection).attr('value');
jQuery('#admin_menu_selection').attr('value', vid); (vid); } });
</script>
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en-US.
No comments:
Post a Comment