Sha256: 1cb8af1d17942b37d7916efac36471d43bab362fc2ab25f0bf18dbbd5562b577
Contents?: true
Size: 382 Bytes
Versions: 18
Compression:
Stored size: 382 Bytes
Contents
module ActionKitRest module Pages class Base < ActionKitRest::Base # allows finding by name def find(name) response = list(name: name) response.obj.first end def find_or_create(params) page = find(params[:name]) if page.blank? page = create(params) end page end end end end
Version data entries
18 entries across 18 versions & 1 rubygems