{"action":"created","issue":{"url":"https://api.github.com/repos/westernmilling/entity_master_app/issues/26","labels_url":"https://api.github.com/repos/westernmilling/entity_master_app/issues/26/labels{/name}","comments_url":"https://api.github.com/repos/westernmilling/entity_master_app/issues/26/comments","events_url":"https://api.github.com/repos/westernmilling/entity_master_app/issues/26/events","html_url":"https://github.com/westernmilling/entity_master_app/pull/26","id":83730713,"number":26,"title":"Update Entity cached_long_name","user":{"login":"josephbridgwaterrowe","id":1495123,"avatar_url":"https://avatars.githubusercontent.com/u/1495123?v=3","gravatar_id":"","url":"https://api.github.com/users/josephbridgwaterrowe","html_url":"https://github.com/josephbridgwaterrowe","followers_url":"https://api.github.com/users/josephbridgwaterrowe/followers","following_url":"https://api.github.com/users/josephbridgwaterrowe/following{/other_user}","gists_url":"https://api.github.com/users/josephbridgwaterrowe/gists{/gist_id}","starred_url":"https://api.github.com/users/josephbridgwaterrowe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/josephbridgwaterrowe/subscriptions","organizations_url":"https://api.github.com/users/josephbridgwaterrowe/orgs","repos_url":"https://api.github.com/users/josephbridgwaterrowe/repos","events_url":"https://api.github.com/users/josephbridgwaterrowe/events{/privacy}","received_events_url":"https://api.github.com/users/josephbridgwaterrowe/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/westernmilling/entity_master_app/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/westernmilling/entity_master_app/labels/in%20progress","name":"in progress","color":"ededed"}],"state":"open","locked":false,"assignee":{"login":"michaelachrisco","id":398491,"avatar_url":"https://avatars.githubusercontent.com/u/398491?v=3","gravatar_id":"","url":"https://api.github.com/users/michaelachrisco","html_url":"https://github.com/michaelachrisco","followers_url":"https://api.github.com/users/michaelachrisco/followers","following_url":"https://api.github.com/users/michaelachrisco/following{/other_user}","gists_url":"https://api.github.com/users/michaelachrisco/gists{/gist_id}","starred_url":"https://api.github.com/users/michaelachrisco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michaelachrisco/subscriptions","organizations_url":"https://api.github.com/users/michaelachrisco/orgs","repos_url":"https://api.github.com/users/michaelachrisco/repos","events_url":"https://api.github.com/users/michaelachrisco/events{/privacy}","received_events_url":"https://api.github.com/users/michaelachrisco/received_events","type":"User","site_admin":false},"milestone":null,"comments":8,"created_at":"2015-06-01T22:49:29Z","updated_at":"2015-06-01T23:54:08Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/westernmilling/entity_master_app/pulls/26","html_url":"https://github.com/westernmilling/entity_master_app/pull/26","diff_url":"https://github.com/westernmilling/entity_master_app/pull/26.diff","patch_url":"https://github.com/westernmilling/entity_master_app/pull/26.patch"},"body":"  Update the Entity cached_long_name in the UpdateEntity\r\n  service object.\r\n\r\n  Add additional examples to the create and update entity\r\n  service object specs to ensure this correct behavior.\r\n\r\n  Change travis slack configuration to use the new WM-IT\r\n  account.\r\n\r\n  Closes #25."},"comment":{"url":"https://api.github.com/repos/westernmilling/entity_master_app/issues/comments/107749055","html_url":"https://github.com/westernmilling/entity_master_app/pull/26#issuecomment-107749055","issue_url":"https://api.github.com/repos/westernmilling/entity_master_app/issues/26","id":107749055,"user":{"login":"michaelachrisco","id":398491,"avatar_url":"https://avatars.githubusercontent.com/u/398491?v=3","gravatar_id":"","url":"https://api.github.com/users/michaelachrisco","html_url":"https://github.com/michaelachrisco","followers_url":"https://api.github.com/users/michaelachrisco/followers","following_url":"https://api.github.com/users/michaelachrisco/following{/other_user}","gists_url":"https://api.github.com/users/michaelachrisco/gists{/gist_id}","starred_url":"https://api.github.com/users/michaelachrisco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michaelachrisco/subscriptions","organizations_url":"https://api.github.com/users/michaelachrisco/orgs","repos_url":"https://api.github.com/users/michaelachrisco/repos","events_url":"https://api.github.com/users/michaelachrisco/events{/privacy}","received_events_url":"https://api.github.com/users/michaelachrisco/received_events","type":"User","site_admin":false},"created_at":"2015-06-01T23:54:08Z","updated_at":"2015-06-01T23:54:08Z","body":"Basically: \r\n```ruby\r\n# An entity is a representation of an organization.\r\n#\r\n# Entities can be any kind of organization, customer, vendor, etc.\r\nclass Entity < ActiveRecord::Base\r\n  acts_as_paranoid\r\n  belongs_to :parent_entity, :class_name => Entity\r\n  validates \\\r\n    :is_active,\r\n    :name,\r\n    :reference,\r\n    :uuid,\r\n    :presence => true\r\n  validates :reference, :uniqueness => true\r\n\r\n  def cached_long_name\r\n    #{reference} - #{name}\r\n  end\r\nend\r\n```\r\n\r\nIf cached_long_name is not needed within the DB. "}}