-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
104 changed files
with
1,527 additions
and
24 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Place all the behaviors and hooks related to the matching controller here. | ||
# All this logic will automatically be available in application.js. | ||
# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
// Place all the styles related to the categories controller here. | ||
// They will automatically be included in application.css. | ||
// You can use Sass (SCSS) here: http://sass-lang.com/ |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
class CategoriesController < ApplicationController | ||
|
||
def new | ||
@category = Category.new | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,31 @@ | ||
class ItemsController < ApplicationController | ||
|
||
def show | ||
@item = Item.find params[:id] | ||
@box = Box.find params[:box_id] | ||
@warehouse = Warehouse.find params[:warehouse_id] | ||
end | ||
|
||
def new | ||
@box = Box.find params[:box_id] | ||
@warehouse = Warehouse.find params[:warehouse_id] | ||
@items = @box.items | ||
@item = Item.new | ||
@item = Item.new | ||
end | ||
|
||
def create | ||
@box = Box.find params[:box_id] | ||
@warehouse = Warehouse.find params[:warehouse_id] | ||
@items = @box.items | ||
@item = Item.create params[:item] | ||
@item.box = @box | ||
if @item.save | ||
flash[:notice] = "Filling the little boxes" | ||
render :new | ||
else | ||
flash[:error] = "Oh noes!" | ||
render :new | ||
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
module CategoriesHelper | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,17 @@ | ||
class Box < ActiveRecord::Base | ||
belongs_to :warehouse | ||
has_many :items | ||
|
||
validates_presence_of :description | ||
validates_length_of :description, :maximum => 140 | ||
|
||
searchable do | ||
text :description, :boost => 5 | ||
text :items do items.map(&:name) + items.map(&:description) end | ||
end | ||
|
||
def create_qr_code | ||
p "Hello" | ||
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
HW |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<%= semantic_form_for @category, :url => categories_path do |f| %> | ||
<%= f.inputs do %> | ||
<%= f.input :name %> | ||
<% end %> | ||
<%= f.buttons do %> | ||
<%= f.commit_button %> | ||
<% 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<div class="item"> | ||
<span class="name"><%= @item.name %></span> | ||
<span class="description"><%= @item.description %></span> | ||
</div> | ||
|
||
<% content_for :sidebar do %> | ||
<%= link_to "Boxes", warehouse_path(@warehouse) %> | ||
<%= link_to "Items", warehouse_box_path(@warehouse,@box) %> | ||
<%= link_to "Category", new_category_path %> | ||
<% 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,7 @@ | ||
<% if user_signed_in? %> | ||
<% if @warehouses.empty? %> | ||
<%= button_to "Create Warehouse", new_warehouse_path, :method => :get %> | ||
<% else %> | ||
<% @warehouses.each do |warehouse| %> | ||
<%= link_to "Warehouse #{warehouse.id}", warehouse_path(warehouse) %> | ||
<% end %> | ||
<% end %> | ||
<% @warehouses.each do |warehouse| %> | ||
<%= link_to "Warehouse #{warehouse.id}", warehouse_path(warehouse) %> | ||
<% end %> | ||
<%= button_to "Create Warehouse", new_warehouse_path, :method => :get %> | ||
<% 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
production: | ||
solr: | ||
hostname: localhost | ||
port: 8983 | ||
log_level: WARNING | ||
|
||
development: | ||
solr: | ||
hostname: localhost | ||
port: 8982 | ||
log_level: INFO | ||
|
||
test: | ||
solr: | ||
hostname: localhost | ||
port: 8981 | ||
log_level: WARNING |
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
Empty file.
Oops, something went wrong.