Add rails_dom_id_helper and refactor