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
| admin_store_root /refinery/store(.:format) {:controller=>"admin/store/orders", :action=>"index"} | |
| admin_store_orders GET /refinery/store/orders(.:format) {:action=>"index", :controller=>"admin/store/orders"} | |
| POST /refinery/store/orders(.:format) {:action=>"create", :controller=>"admin/store/orders"} | |
| new_admin_store_order GET /refinery/store/orders/new(.:format) {:action=>"new", :controller=>"admin/store/orders"} | |
| edit_admin_store_order GET /refinery/store/orders/:id/edit(.:format) {:action=>"edit", :controller=>"admin/store/orders"} | |
| admin_store_order GET /refinery/store/orders/:id(.:format) {:action=>"show", :controller=>"admin/store/orders"} | |
| PUT |
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
| Alabaster::Application.routes.draw do | |
| scope(:path => 'refinery', :as => 'admin', :module => 'admin') do | |
| scope(:path => 'blog', :as => 'blog', :module => 'blog') do | |
| root :to => 'comments#index' | |
| resources :posts do | |
| get 'uncategorized', :on => :collection | |
| end | |
| end | |
| scope(:path => 'store', :as => 'store', :module => 'store') 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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>Alabaster</title> | |
| <%= stylesheet_link_tag :all %> | |
| <%= javascript_include_tag :defaults %> | |
| <%= csrf_meta_tag %> | |
| </head> | |
| <body> | |
| <div id="wrapper" class="1-column-layout"> |
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
| require "devape_survey/engine" | |
| module DevapeSurvey | |
| config.to_prepare do | |
| ApplicationController.helper(SurveysHelper) | |
| 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
| MAIN FORM | |
| <%= form_for(@project) do |f| %> | |
| <% if @project.errors.any? %> | |
| <div id="error_explanation"> | |
| <h2><%= pluralize(@project.errors.count, "error") %> prohibited this project from being saved:</h2> | |
| <ul> | |
| <% @project.errors.full_messages.each do |msg| %> | |
| <li><%= msg %></li> | |
| <% 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
| #loop through tsv, add to array | |
| f = File.open(input_file, "r") | |
| f.each_with_index { |line, i| | |
| name_index = "" | |
| price_index = "" | |
| if(i==0) then | |
| headers = line.split("\t") | |
| headers[2] = headers.last.strip | |
| name_index = headers.index("Name") | |
| price_index = headers.index("Price") |
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 Output < | |
| Struct.new(:name, :price) | |
| end | |
| unless ARGV.length == 1 | |
| puts "Wrong number of Arguments" | |
| puts "Usage: ruby #{File.basename(__FILE__)} InputFile.tsv > SortedOutputFile.tsv\n" | |
| exit | |
| 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
| 1000.times do |i| | |
| m = Member.create(:email=> i.to_s + "john@john.com", :password=>"foobar", :password_confirmation=>"foobar", :orientation_id=>Orientation.random.first.id, :gender_id=↷ | |
| m.isos << Iso.random.first | |
| m.isos << Iso.random.first | |
| 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 Output < | |
| Struct.new(:name, :price) | |
| end | |
| unless ARGV.length == 1 | |
| puts "Wrong number of Arguments" | |
| puts "Usage: ruby #{File.basename(__FILE__)} InputFile.tsv" | |
| exit | |
| 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 Output < | |
| Struct.new(:name, :price) | |
| end | |
| unless ARGV.length == 1 | |
| puts "Wrong number of Arguments" | |
| puts "Usage: ruby #{File.basename(__FILE__)} InputFile.tsv" | |
| exit | |
| end |
OlderNewer