This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Set on viewDidLoad() | |
self.tableView.backgroundColor = UIColor(patternImage: UIImage(named: "empty-cell.png")!) | |
Where ever you call your table reload after API call add this line: | |
self.tableView.backgroundColor = UIColor.whiteColor() | |
Here is the empty cell image used as a background pattern I made: | |
http://s3.postimg.org/895ohr0c3/empty_cell.png |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Stellar | |
include HTTParty | |
base_uri ENV.fetch('STELLAR_BASE_URI', 'https://horizon-testnet.stellar.org') | |
attr_accessor :cursor | |
def initialize(account_id, cursor) | |
# account public key | |
@account_id = account_id |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "#{Rails.root}/lib/sdk/stellar" | |
class PaymentProcessor | |
def self.perform | |
# Create or find a setting record by `cursor` key | |
cursor_setting = Setting.find_or_create_by(key: 'cursor') | |
# Extract the value of the `cursor` if it exists in DB | |
cursor = cursor_setting&.value |