"The best cameras are useless if no great photos are ever taken with it. Just like life, we should always strive for excellence and, at the same time, craft amazing experiences with only some people around us." - Josh
<--Call to Action here-->
"The best cameras are useless if no great photos are ever taken with it. Just like life, we should always strive for excellence and, at the same time, craft amazing experiences with only some people around us." - Josh
<--Call to Action here-->
Simply replace things and thing with whatever large object you're iterating
over and put your iteration code in place of the code comment.
In ruby you can append with_index and an index variable to your enumerators
and it will give you an iterator counter (i). Using this we calculate a progress precentage:
(i.to_f / things.length * 100).to_iinitialize: once, when the controller is first instantiatedconnect: anytime the controller is connected to the DOM| <!doctype html> | |
| <!-- Adapted from https://gist.github.com/tfausak/2222823 --> | |
| <html> | |
| <head> | |
| <title>Mobile-ready web app</title> | |
| <!-- CONFIGURATION --> |