jquery , rails remote : true

July 09, 2020 07:09

This work for the fresh page.$jquery = $("#audio") but after$('.modal-body').html('<%= j render("form") %>'); the $jquery will not work anymoreit seems like jquery still remember the cached and can't reference the new onethat rails replace.so,$jquery = $(".modal-body").find("audio") Helps,

union join

July 07, 2020 07:35

def join_both_message inner_query = Message\ .merge(join_voice_message)\ .joins("UNION SELECT messages.* FROM messages")\ .merge(join_text_message) Message.unscoped.select("*").from(inner_query, :messages) end

jQuery querystring

July 01, 2020 09:59

When select option is changed, link to new page with query string$(document).on("change", "#province", function(e) { var province = $(this).val() var params = new URLSearchParams(location.search) params.set('province', province); var url = `${location.pathname}?${params}` ...

🎉 Research topics

June 27, 2020 01:07

Devise extensionsMasqueraderails template

deep munge in rails

June 26, 2020 08:00

When submit a form , rails will strip empty paramsso you cannot update roles by just clear all roles from this variable.this is an expected behavior in rails (for security reason)I also have to try to disable deep_munge but still no luck# config/application.rb config.action_dispatch.deep_munge =...

hello world

June 24, 2020 17:56

My name is radinNice to meet you.