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
BY DEFAULT, these layouts apply: | |
magento.test/app/design/frontend/base/default/layout | |
This is overridden by theme layouts on a per-file basis: | |
magento.test/app/design/frontend/base/theme042/layout | |
These can be overridden by layouts stored on a per-page basis in the database. These are accessed through: | |
admin backend > CMS > Pages > *A Page* > Design > *The top box* |
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
mv magento.test magento.test.WORKING | |
git clone [email protected]:53cr/Magento.git | |
mv Magento magento.test | |
cd magento.test | |
git pull origin cityjewellers |
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
select{margin-bottom:1px; height:21px;} | |
input{height:15px;} | |
.full-width{width:100%;} | |
.ie-fix{width:100%; position:relative;} | |
.container{width:100%; overflow:hidden;} | |
.clear{clear:both;} | |
.radio, checkbox{border:0; background:0;} | |
.pages-indent{padding:17px;} |
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
$.getJSON("<%=raw @yt_request%>", function(data) { |
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
<!-- markup structure --> | |
<table> | |
<tbody> | |
<tr> | |
<td>*CONTENT ONE*</td> | |
<td>*CONTENT TWO*</td> | |
</tr> | |
</tbody> | |
</table> |
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
<!-- html snippet --> | |
<div class="wrapper_div"> | |
This is some text that I do not want to see in the output | |
<div class="inner_div"> | |
This is some text that I want to see in the output | |
</div> | |
</div> |
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
## routes.rb | |
match "blog" => "blog#index" | |
match "blog/:year/:month" => "blog#by_date", :constraints => {:year => /\d{4}/, :month => /\d{2}/}, :as => 'blog' | |
match "blog/:tag" => "blog#by_tag", :as => 'blog' | |
##a view: | |
= link_to "Foo", blog_path(:tag => "bar") | |
##it tries to route it to the second route, realizes the bound params don't match what the route specifies, and shits |
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 Post < ActiveRecord::Base | |
scope :date_counts, lambda { | |
group('DATE_FORMAT(created_at, "%Y/%m")').count | |
} | |
##Post.date_counts GENERATES ERROR: ArgumentError: Unknown key(s): 2009/01, 2009/02, 2009/03, 2009/04, 2009/06 ... etc | |
def self.date_counts | |
self.group('DATE_FORMAT(created_at, "%Y/%m")').count | |
end |
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
##in view: | |
link_to "TEST", blog_path(:year => 2010, :month => 09) | |
##when routes looks like: | |
match 'blog', => 'blog#index' | |
match 'blog(/:year/:month)' => 'blog#index' |
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
string = [<<ONE, <<TWO, <<THREE] | |
the first thing | |
ONE | |
the second thing | |
TWO | |
and the third thing | |
THREE | |
# evaluates to: | |
# ["the first thing", "the second thing", "and the third thing"] |