Ruby, Rails, Javascript
GitHub | labels: wsc2019, good first issue | Website
dev.to is where programmers share ideas and help each other grow. It is an online community for sharing and discovering great ideas, having debates, and making friends.
| {"gameLink":"www.flickgame.org","activeIndex":5,"canvasses":[[84,"7",9,"4",4,"9",63,"4",84,"7",9,"4",3,"9",64,"4",84,"7",9,"4",3,"9",64,"4",84,"7",9,"4",3,"9",64,"4",84,"7",9,"4",3,"9",64,"4",84,"7",9,"4",3,"9",64,"4",84,"7",9,"4",3,"9",64,"4",84,"7",9,"4",3,"9",64,"4",84,"7",9,"4",4,"9",63,"4",83,"7",11,"4",3,"9",1,"4",2,"9",60,"4",83,"7",11,"4",6,"9",60,"4",83,"7",11,"4",5,"9",61,"4",83,"7",11,"4",5,"9",31,"4",3,"d",27,"4",83,"7",11,"4",4,"9",31,"4",5,"d",26,"4",83,"7",12,"4",3,"9",31,"4",5,"d",26,"4",83,"7",12,"4",3,"9",31,"4",5,"d",26,"4",82,"7",13,"4",3,"9",31,"4",1,"d",1,"e",3,"d",26,"4",82,"7",13,"4",4,"9",30,"4",3,"e",2,"d",26,"4",82,"7",14,"4",3,"9",30,"4",3,"e",2,"d",26,"4",82,"7",14,"4",3,"9",30,"4",3,"e",3,"d",25,"4",82,"7",14,"4",3,"9",30,"4",3,"e",3,"d",25,"4",82,"7",14,"4",4,"9",28,"4",3,"e",4,"d",25,"4",82,"7",15,"4",3,"9",28,"4",3,"e",5,"d",24,"4",82,"7",13,"4",5,"9",28,"4",4,"e",5,"d",23,"4",82,"7",13,"4",6,"9",3,"4",4,"d",21,"4",3,"e",7,"d",21,"4",78,"7",2,"f",2,"7",13,"4",6,"9",8,"d",20,"4 |
I hereby claim:
To claim this, I am signing this object:
| def human_readable_billable_time | |
| billable_entries_by_rate_type = entries.select(&:billable?).group_by(&:rate_type) | |
| human_readable_time_string = billable_entries_by_rate_type.map do |type, entries| | |
| "#{entries.map(&:amount).sum} #{type == "weekly" ? 'days' : 'hours'}" | |
| end.join(" + ") | |
| human_readable_time_string.empty? ? "No billable time" : human_readable_time_string | |
| end |
| =Navigating= | |
| visit('/projects') | |
| visit(post_comments_path(post)) | |
| =Clicking links and buttons= | |
| click_link('id-of-link') | |
| click_link('Link Text') | |
| click_button('Save') | |
| click('Link Text') # Click either a link or a button | |
| click('Button Value') |
| // AJAX REQUEST | |
| $(document).ready(function() { | |
| // This is called after the document has loaded in its entirety | |
| // This guarantees that any elements we bind to will exist on the page | |
| // when we try to bind to them | |
| // See: http://docs.jquery.com/Tutorials:Introducing_$(document).ready() | |
| $('form').submit( function(e) { | |
| e.preventDefault(); |