mercredi 18 janvier 2017

Render HTML executing the HTML of the page

My page has javascript embedded and I need to render js along with the html page.

Follow the code that I am using to render my page:

render :update do |page|
  get_custom_categories
  element = params[:modal].present? ? ".modal-body .object-show" : ".object-show"
  page[element].js(render partial: 'details_edit')
 end

Aucun commentaire:

Enregistrer un commentaire