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
| source 'https://rubygems.org' | |
| gem 'rails', '3.2.12' | |
| group :development do | |
| gem 'sqlite3' | |
| end | |
| group :production do |
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
| source :rubygems | |
| def darwin_only(require_as) | |
| RUBY_PLATFORM.include?('darwin') && require_as | |
| end | |
| def linux_only(require_as) | |
| RUBY_PLATFORM.include?('linux') && require_as | |
| 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
| 22:45][myapp(master)][v. ruby-1.9.3-p194]$ heroku logs | |
| 2013-02-05T20:30:24+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.11/lib/rails/commands.rb:50:in `tap' | |
| 2013-02-05T20:30:24+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.11/lib/rails/commands.rb:50:in `<top (required)>' | |
| 2013-02-05T20:30:24+00:00 app[web.1]: from script/rails:6:in `require' | |
| 2013-02-05T20:30:24+00:00 app[web.1]: from script/rails:6:in `<main>' | |
| 2013-02-05T20:30:24+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.4/lib/rack/builder.rb:40:in `eval' | |
| 2013-02-05T20:30:24+00:00 app[web.1]: from /app/config.ru:in `<main>' | |
| 2013-02-05T20:30:24+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.11/lib/rails/commands.rb:55:in `block in <top (required)>' | |
| 2013-02-05T20:30:24+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.11/lib/rails/commands/server.rb:46:in `app' | |
| 2013-02-05T20:30:24+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1 |
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
| While working through the setup of the latest release of Spree, I ran into an error concerning "gem devise-encryptable" it seems that you can solve this error by simply moving the "gem devise-encryptable" line to the bottom of the gemfile. | |
| source 'https://rubygems.org' | |
| gem 'rails', '3.2.11' | |
| # Bundle edge Rails instead: | |
| # gem 'rails', :git => 'git://github.com/rails/rails.git' | |
| gem 'sqlite3' |
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
| <%- model_class = Customer -%> | |
| <div class="page-header"> | |
| <h1><%=t '.title', :default => model_class.model_name.human %></h1> | |
| </div> | |
| <dl class="dl-horizontal"> | |
| <dt><strong><%= model_class.human_attribute_name(:name_first) %>:</strong></dt> | |
| <dd><%= @customer.name_first %></dd> | |
| <dt><strong><%= model_class.human_attribute_name(:name_last) %>:</strong></dt> | |
| <dd><%= @customer.name_last %></dd> |
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 CustomersController < ApplicationController | |
| before_filter :authenticate_user! | |
| # GET /customers | |
| # GET /customers.json | |
| def create | |
| @customer = Customer.new(params[:customer]) | |
| @customer.user_id = current_user.id | |
| if @customer.save |
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 Notes < ActiveRecord::Migration | |
| def up | |
| end | |
| def down | |
| end | |
| 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
| class CreateNotes < ActiveRecord::Migration | |
| def change | |
| create_table :notes do |t| | |
| t.string :title | |
| t.text :comment | |
| t.timestamps | |
| end | |
| end | |
| 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
| <%= form_for @customer, :html => {:multipart => true} do |f| %> | |
| <%= f.hidden_field :id %> | |
| <p> | |
| <%= f.file_field :image %> | |
| </p> | |
| <p><%= f.submit "Upload" %></p> | |
| <% end %> |
NewerOlder