From 55f83789409bc876f61911581908c32175e721d7 Mon Sep 17 00:00:00 2001 From: carlad Date: Thu, 14 Apr 2016 11:15:17 +0200 Subject: [PATCH] add branch_name method --- Gemfile.lock | 3 --- lib/travis/api/v3/models/request.rb | 7 +++++++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index f4305853..8aa7952c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -388,6 +388,3 @@ DEPENDENCIES travis-yaml! unicorn yard-sinatra! - -BUNDLED WITH - 1.11.2 diff --git a/lib/travis/api/v3/models/request.rb b/lib/travis/api/v3/models/request.rb index fd1387a8..a5df405f 100644 --- a/lib/travis/api/v3/models/request.rb +++ b/lib/travis/api/v3/models/request.rb @@ -6,5 +6,12 @@ module Travis::API::V3 has_many :builds serialize :config serialize :payload + + # has_one :branch_name, + # primary_key: [:id, :branch_name] + + def branch_name + read_attribute(:branch_name) + end end end