Quantcast
Viewing all articles
Browse latest Browse all 13

Rails options_from_collection_for_select with custom attributes for each option

You probably already know that you can use options_from_collection_for_select helper method generate <option></option> from a collection. If you are unaware of it, you can check this api documentation. It helped me greatly until I needed some custom attributes to each <option></option> which will be used by jQuery for doing some tasks in UI level. Custom attributes will […]

Viewing all articles
Browse latest Browse all 13

Trending Articles