fatfreecrm/fat_free_crm

View on GitHub
app/views/accounts/show.js.haml

Summary

Maintainability
Test Coverage
- entity_name = controller.controller_name.singularize.underscore #account
- @entity = instance_variable_get("@#{entity_name}")

$('#main').html('#{ j (render template: "#{entity_name.pluralize}/show", formats: [:html], entity_name => @entity) }');
= raw generate_js_for_popups(@entity, :tasks, :contacts, :opportunities)