This file contains 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
{ | |
"color_scheme": "Packages/Color Scheme - Default/Solarized (Light).tmTheme", | |
"font_face": "menlo", | |
"font_size": 14 | |
} |
This file contains 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
Show hidden characters
// Settings in here override those in "Default/Base File.sublime-settings", and | |
// are overridden in turn by file type specific settings. Place your settings | |
// here, to ensure they're preserved when upgrading. | |
{ | |
// Sets the colors used within the text area | |
"color_scheme": "Packages/Color Scheme - Default/Solarized (light).tmTheme", | |
// Note that the font_face and font_size are overriden in the platform | |
// specific settings file, for example, "Base File (Linux).sublime-settings". | |
// Because of this, setting them here will have no effect: you must set them |
This file contains 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
[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # Load RVM function | |
txtred='\033[0;31m' | |
txtgrn='\033[0;32m' | |
txtcya='\033[0;36m' | |
txtpur='\033[;35m' | |
txtrst='\e[0m' # Text Reset | |
print_before_the_prompt () { | |
printf "$txtpur$USER: $PWD\n" |
This file contains 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
<script type="text/javascript"> | |
//<![CDATA[ | |
var variant_options = new VariantOptions( | |
<%== @product.variant_options_hash.to_json %>, | |
<%== Spree::Config[:allow_backorders] %> | |
); | |
//]]> | |
</script> |
This file contains 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
source 'http://rubygems.org' | |
gem 'rails', '3.1.0' | |
gem 'sqlite3' | |
gem 'spree', :git => 'git://github.com/spree/spree.git' | |
gem 'haml-rails' | |
# Gems used only for assets and not required | |
# in production environments by default. |
This file contains 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
--> bundle exec spree extension foobar | |
create spree_foobar | |
create spree_foobar/app | |
create spree_foobar/app/assets/javascripts/admin/spree_foobar.js | |
create spree_foobar/app/assets/javascripts/store/spree_foobar.js | |
create spree_foobar/app/assets/stylesheets/admin/spree_foobar.css | |
create spree_foobar/app/assets/stylesheets/store/spree_foobar.css | |
create spree_foobar/app/controllers | |
create spree_foobar/app/helpers | |
create spree_foobar/app/models |
This file contains 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
get '/foo' do | |
"in /foo" | |
redirect to('/bar') | |
end | |
get '/bar' do | |
"in /bar" | |
end |
This file contains 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
# domains/show.html.haml | |
%h2 Keywords | |
= link_to "New keyword", new_domain_keyword_path(:domain_id => @domain.id) | |
# keywords/new.html.haml | |
= form_for([@domain, @keyword]) do |f| | |
= f.label :term | |
= f.text :term | |
# controllers/keywords_controller.rb |
This file contains 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
resources :domains do | |
resources :keywords | |
end |
This file contains 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
# keywords_controller.rb | |
class KeywordsController < ApplicationController | |
def new | |
@domain = Domain.find(params[:domain_id]) | |
@keyword = @domain.keywords.new | |
end | |
end | |
# domains/new.html.haml | |
%h1= @domain.name |
OlderNewer