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
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 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 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 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 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 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