Sitelet https://github.com/tip4commit/tip4commit/pull/172
Skip to content

supress visibility of unclaimed tips (issue #146) - #172

Merged
sashazykov merged 1 commit into
tip4commit:masterfrom
bits4commits:supress-unclaimed-tips-visibility
Nov 2, 2014
Merged

sashazykov merged 1 commit into
tip4commit:masterfrom
bits4commits:supress-unclaimed-tips-visibility

Conversation

@bill-auger

Copy link
Copy Markdown
Contributor
  • filtered all Tips relations through the Tips:with_address scope
    except for UsersController#show (private page)
  • filtered users with zero withdrawn_amount in UsersController#index
  • removed :no_bitcoin_address message from Tips#index

NOTES:

i do not have a full setup (blockchain account , etc) so i could not test this feature manually - it was implemented driven by cucumber tests which are not included in this PR because they were implemented on the tip of my HEAD using an incompatible routing/testing scheme implemented in PR #141 and would cause travis to fail today - they are included in PR #142 along with tests for several other recent features pending merge of the new pretty url routing scheme

regarding the TipsController#index action switched on no params -

the original query

Tip.includes(:user , :project)

the replacement query

Tip.with_address.includes(:project)
the Tips:with_address scope joins(:user) so this should not have broken anything but unfortunately no tests exist for the Tips view so this should be verified manually on a staging system

regarding the UsersController#index action -
im a bit uncertain of the semantics here but the User :withdrawn_amount is based on the tips.paid scope which is based on the existence of a :sendmany_id - so im assuming that this means that a tip that was offered to someone without bitcoin_address would not have a sendmany_id and any so such user would have a zero withdrawn_amount

* filtered all Tips relations through the Tips:with_address scope
      except for UsersController#show (private page)
* filtered users with zero withdrawn_amount in UsersController#index
* removed :no_bitcoin_address message from Tips#index

NOTES:

i do not have a full setup (blockchain account , etc) so i could not test this feature manually - it was implemented driven by cucumber tests which are not included in this PR because they were implemented on the tip of my HEAD using an incompatible routing/testing scheme implemented in PR tip4commit#141 and would cause travis to fail today - they are included in PR tip4commit#142 along with tests for several other recent features pending merge of the new pretty url routing scheme

regarding the TipsController#index action switched on no params -
  # the original query
  Tip.includes(:user , :project)
  # the replacement query
  Tip.with_address.includes(:project)
the Tips:with_address scope joins(:user) so this should not have broken anything but unfortunately no tests exist for the Tips view so this should be verified manually on a staging system

rearding the UsersController#index action -
im a bit uncertain of the semantics here but the User :withdrawn_amount is based on the tips.paid scope which is based on the existence of a :sendmany_id - so im assuming that this means that a tip that was offered to someone without bitcoin_address would not have a sendmany_id and any so such user would have a zero withdrawn_amount
@bill-auger bill-auger changed the title supress visibility of unclaimed tips issue #146 supress visibility of unclaimed tips (issue #146) Nov 2, 2014
sashazykov added a commit that referenced this pull request Nov 2, 2014
…bility

supress visibility of unclaimed tips (issue #146)
@sashazykov
sashazykov merged commit 2cdfc9f into tip4commit:master Nov 2, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants