Sha256: 2f97cb094a5025cf2a150da726a240784f612df8987aac00a4505783a811d641

Contents?: true

Size: 1.62 KB

Versions: 22

Compression:

Stored size: 1.62 KB

Contents

<div class="container">
  <% if flash[:error] %>
    <div class="error"><%= flash[:error] %></div>
  <% end %>
  <div class="row">
    <div class="column">
      <pre>
        <p>Get by ID</p>
        <p># app/lib/services/hubspot/companies/get_by_id.rb</p>

        <p>Update</p>
        <p># app/lib/services/hubspot/companies/update.rb</p>
      </pre>
        <h3>Properties</h3>
        <%= form_for :company, url: "/companies/#{params[:id]}", method: 'put' do |form| %>
          <%= label(:name, "Name") %>
          <%= form.text_field(:name, value: @company.properties['name']) %>
          <%= label(:domain, "Domain") %>
          <%= form.text_field(:domain, value: @company.properties['domain']) %>
          <%= submit_tag("Save", class: 'button-primary') %>
        <% end %>
    </div>
    <div class="column">
      <pre>
        <p>Get contacts associated with company</p>
        <p># app/lib/services/hubspot/associations/get_by_id.rb</p>
      </pre>
      <h3>Contacts</h3>
      <%= link_to('Manage contacts', company_contacts_path(@company.id), class: 'button', id: 'new-contact') %>
      <% if @contacts.present? %>
        <table>
            <thead>
            <tr>
                <th>ID</th>
                <th>Name</th>
            </tr>
            </thead>
            <tbody>
              <% @contacts.each do |contact| %>
                <tr>
                  <td><%= contact.id %></td>
                  <td><%= [contact.properties['firstname'], contact.properties['lastname']].join(' ') %></td>
                </tr>
              <% end %>
            </tbody>
        </table>
      <% end%>
    </div>
  </div>
</div>

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
hubspot-api-client-9.0.0 sample-apps/companies-app/app/views/companies/show.html.erb
hubspot-api-client-8.0.1 sample-apps/companies-app/app/views/companies/show.html.erb
hubspot-api-client-8.0.0 sample-apps/companies-app/app/views/companies/show.html.erb
hubspot-api-client-7.3.0 sample-apps/companies-app/app/views/companies/show.html.erb
hubspot-api-client-7.2.0 sample-apps/companies-app/app/views/companies/show.html.erb
hubspot-api-client-7.1.1 sample-apps/companies-app/app/views/companies/show.html.erb
hubspot-api-client-7.1.0 sample-apps/companies-app/app/views/companies/show.html.erb
hubspot-api-client-7.0.0 sample-apps/companies-app/app/views/companies/show.html.erb
hubspot-api-client-6.0.0 sample-apps/companies-app/app/views/companies/show.html.erb
hubspot-api-client-5.0.0 sample-apps/companies-app/app/views/companies/show.html.erb
hubspot-api-client-4.0.0 sample-apps/companies-app/app/views/companies/show.html.erb
hubspot-api-client-3.3.0 sample-apps/companies-app/app/views/companies/show.html.erb
hubspot-api-client-3.2.0 sample-apps/companies-app/app/views/companies/show.html.erb
hubspot-api-client-3.1.1 sample-apps/companies-app/app/views/companies/show.html.erb
hubspot-api-client-3.1.0.pre.beta sample-apps/companies-app/app/views/companies/show.html.erb
hubspot-api-client-3.0.0.pre.beta sample-apps/companies-app/app/views/companies/show.html.erb
hubspot-api-client-2.3.2 sample-apps/companies-app/app/views/companies/show.html.erb
hubspot-api-client-2.3.1 sample-apps/companies-app/app/views/companies/show.html.erb
hubspot-api-client-2.2.0 sample-apps/companies-app/app/views/companies/show.html.erb
hubspot-api-client-2.1.0 sample-apps/companies-app/app/views/companies/show.html.erb