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
| <%= link_to 'Back', @cart %> | |
| links you back to the controller and show action for @cart | |
| <%= link to controller: 'store', action: 'new' %> | |
| is now | |
| <%= link to new_store_path %> |
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
| using link_to via AJAX to update quantities on a form ... here is the code that passes the new quantity amount ... | |
| <%= link_to ' ^ ', line_item_path(line_item, :amount => 1), | |
| method: :put, | |
| remote: true %> | |
| NOTE - this will NOT work without the object (line_item) in the parenths with the :amount |
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
| $('.guitarClick1 a').click(function() { | |
| $('h2.chooseInstrument').replaceWith('<h2 class="chooseInstrument">Step 2: Choose a body style</h2>'); | |
| }) |
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
| > gem install 'compass' | |
| add to Gemfile in app - assets block | |
| group :assets do | |
| gem 'compass' | |
| gem 'sass-rails', '~> 3.1.4' | |
| # gem 'coffee-rails', '~> 3.1.1' | |
| # gem 'uglifier', '>= 1.0.3' | |
| end | |
| > bundle install |
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
| git remote add origin [email protected]:joncode/wibble.git | |
| you have to include the word 'origin' for this to work |
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
| rails g bootstrap:themed videos -f | |
| where videos is the scaffold to be styled by twitter bootstrap | |
| the '-f' flag means force -- i.e. delete any styles that are there already | |
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
| control - boolean gives you controls on screen | |
| autoplay - boolean starts playing the vid automatically | |
| preload="none" ="metadata" ="auto" | |
| - tells browser whether or not to preload the video entirely , just metadata or not at all | |
| poster="src of poser frame" | |
| - loads an image into the player as poster frame pre-play | |
| loop - loops video , does not work in firefox - use JS to make looper | |
| <script> | |
| $('#videoShow').bind("ended", function() { | |
| this.play(); |
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
| http://www.w3.org/TR/html5/the-video-element.html#the-video-element | |
| http://www.w3.org/TR/html5/media-elements.html#media-data | |
| http://www.w3.org/TR/html5/media-elements.html#concept-media-load-algorithm |
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
| "progress" | |
| "timeupdate" | |
| "durationchange" - whenever the duration of the video content changes , including at load | |
| "canplaythrough" | |
| "loadeddata" | |
| "playing" | |
| "paused" | |
| .ended | |
| .buffered | |
| .duration |
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
| group :development do | |
| gem 'annotate', '~> 2.4.1.beta' | |
| end | |
| bundle install | |
| bundle exec annotate --position after |