diff --git a/Gemfile b/Gemfile index 43081f7..153deb3 100644 --- a/Gemfile +++ b/Gemfile @@ -1,6 +1,6 @@ source 'https://rubygems.org' -ruby '2.2.1' +ruby '2.2.2' gem 'paperclip' gem 'aws-sdk', '~> 1.6' gem 'ratyrate' diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js index 67dbd4c..b8798da 100644 --- a/app/assets/javascripts/application.js +++ b/app/assets/javascripts/application.js @@ -39,14 +39,14 @@ $(function () { if ($('.experiment').length) { var material = $('.material').html(); - $('.unordered-list-materials').on('click', '.add-material-btn', function (e) { + $('.unorder_numbered-list-materials').on('click', '.add-material-btn', function (e) { e.preventDefault(); e.stopPropagation(); - material = material.replace(/\[[0-9]+\]/g, '[' + $('.unordered-list-materials li').length + ']') - .replace(/_[0-9]+_/g, '_' + $('.unordered-list-materials li').length + '_'); + material = material.replace(/\[[0-9]+\]/g, '[' + $('.unorder_numbered-list-materials li').length + ']') + .replace(/_[0-9]+_/g, '_' + $('.unorder_numbered-list-materials li').length + '_'); - $('.unordered-list-materials').append('
Instructions:
<% @experiment.instructions.each do |instruction| %>
- <%= instruction.order %> | <%= instruction.information %>
+ <%= instruction.order_number %> | <%= instruction.information %>
<% end %>
- Order: - <%= @instruction.order %> + order_number: + <%= @instruction.order_number %>
<%= link_to 'Edit', edit_instruction_path(@instruction) %> | diff --git a/app/views/instructions/show.json.jbuilder b/app/views/instructions/show.json.jbuilder index 812a5d4..a8a841e 100644 --- a/app/views/instructions/show.json.jbuilder +++ b/app/views/instructions/show.json.jbuilder @@ -1 +1 @@ -json.extract! @instruction, :id, :experiment_id, :information, :order, :created_at, :updated_at +json.extract! @instruction, :id, :experiment_id, :information, :order_number, :created_at, :updated_at diff --git a/bin/spring b/bin/spring index 7b45d37..839a616 100755 --- a/bin/spring +++ b/bin/spring @@ -1,6 +1,6 @@ #!/usr/bin/env ruby -# This file loads spring without using Bundler, in order to be fast. +# This file loads spring without using Bundler, in order_number to be fast. # It gets overwritten when you run the `spring binstub` command. unless defined?(Spring) diff --git a/config/environments/test.rb b/config/environments/test.rb index 1c19f08..161b5c0 100644 --- a/config/environments/test.rb +++ b/config/environments/test.rb @@ -31,8 +31,8 @@ # ActionMailer::Base.deliveries array. config.action_mailer.delivery_method = :test - # Randomize the order test cases are executed. - config.active_support.test_order = :random + # Randomize the order_number test cases are executed. + config.active_support.test_order_number = :random # Print deprecation notices to the stderr. config.active_support.deprecation = :stderr diff --git a/config/initializers/devise.rb b/config/initializers/devise.rb index df549ab..25502fb 100644 --- a/config/initializers/devise.rb +++ b/config/initializers/devise.rb @@ -137,7 +137,7 @@ # config.extend_remember_period = false # Options to be passed to the created cookie. For instance, you can set - # secure: true in order to force SSL only cookies. + # secure: true in order_number to force SSL only cookies. # config.rememberable_options = {} # ==> Configuration for :validatable diff --git a/config/routes.rb b/config/routes.rb index c937f17..d7f9a27 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -21,7 +21,7 @@ root 'experiments#index' - # The priority is based upon order of creation: first created -> highest priority. + # The priority is based upon order_number of creation: first created -> highest priority. # See how all your routes lay out with "rake routes". # You can have the root of your site routed with "root" diff --git a/db/migrate/20150703152549_create_experiments.rb b/db/migrate/20150703152549_create_experiments.rb index 31689bb..631bd86 100644 --- a/db/migrate/20150703152549_create_experiments.rb +++ b/db/migrate/20150703152549_create_experiments.rb @@ -3,9 +3,10 @@ def change create_table :experiments do |t| t.integer :user_id t.text :description - t.text :lesson t.text :youtube_link t.float :complete_time + t.string :name + t.integer :age t.timestamps null: false end diff --git a/db/migrate/20150703205050_create_instructions.rb b/db/migrate/20150703205050_create_instructions.rb index 8a88b93..8404c23 100644 --- a/db/migrate/20150703205050_create_instructions.rb +++ b/db/migrate/20150703205050_create_instructions.rb @@ -3,7 +3,7 @@ def change create_table :instructions do |t| t.integer :experiment_id t.text :information - t.integer :order + t.integer :order_number t.timestamps null: false end diff --git a/db/migrate/20150704040924_add_name_to_experiment.rb b/db/migrate/20150704040924_add_name_to_experiment.rb deleted file mode 100644 index 4ad9d1c..0000000 --- a/db/migrate/20150704040924_add_name_to_experiment.rb +++ /dev/null @@ -1,5 +0,0 @@ -class AddNameToExperiment < ActiveRecord::Migration - def change - add_column :experiments, :name, :string - end -end diff --git a/db/migrate/20150706172648_add_age_to_experiments.rb b/db/migrate/20150706172648_add_age_to_experiments.rb deleted file mode 100644 index ebb49e2..0000000 --- a/db/migrate/20150706172648_add_age_to_experiments.rb +++ /dev/null @@ -1,5 +0,0 @@ -class AddAgeToExperiments < ActiveRecord::Migration - def change - add_column :experiments, :age, :integer - end -end diff --git a/db/migrate/20150708204716_remove_column.rb b/db/migrate/20150708204716_remove_column.rb deleted file mode 100644 index 1492cfb..0000000 --- a/db/migrate/20150708204716_remove_column.rb +++ /dev/null @@ -1,5 +0,0 @@ -class RemoveColumn < ActiveRecord::Migration - def change - remove_column :experiments, :lesson - end -end diff --git a/db/schema.rb b/db/schema.rb index 5b42115..212eb09 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 20150708204716) do +ActiveRecord::Schema.define(version: 20150708195453) do create_table "average_caches", force: :cascade do |t| t.integer "rater_id" @@ -67,10 +67,10 @@ t.text "description" t.text "youtube_link" t.float "complete_time" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false t.string "name" t.integer "age" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.string "uploaded_file_file_name" t.string "uploaded_file_content_type" t.integer "uploaded_file_file_size" @@ -80,7 +80,7 @@ create_table "instructions", force: :cascade do |t| t.integer "experiment_id" t.text "information" - t.integer "order" + t.integer "order_number" t.datetime "created_at", null: false t.datetime "updated_at", null: false end diff --git a/db/seeds.rb b/db/seeds.rb index 31e6bdc..690d64d 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -14,21 +14,21 @@ youtube_link: "https://www.youtube.com/watch?v=67KXatgoNKs", complete_time: 1.5, name: "Extracting Strawberry DNA") - mat_one = Material.create!(experiment_id: experiment.id, item: "measursing cup") - mat_two = Material.create!(experiment_id: experiment.id, item: "measuring spoon") - mat_three = Material.create!(experiment_id: experiment.id, item: "rubbing alcohol") - - instruction_one = Instruction.create!(experiment_id: experiment.id, - information: "Chill the rubbing alcohol in the freezer. (You'll need it later.)", - order: 1) - instruction_two = Instruction.create!(experiment_id: experiment.id, - information: "Mix the salt, water, and Dawn detergent in a glass or small - bowl. Set the mixture aside. This is your extraction liquid.", - order: 2) - instruction_three = Instruction.create!(experiment_id: experiment.id, - information: "Line the funnel with the cheesecloth, and put the funnel's - tube into the glass.", - order: 3) + Material.create!(experiment_id: experiment.id, item: "measursing cup") + Material.create!(experiment_id: experiment.id, item: "measuring spoon") + Material.create!(experiment_id: experiment.id, item: "rubbing alcohol") + + Instruction.create!(experiment_id: experiment.id, + information: "Chill the rubbing alcohol in the freezer. (You'll need it later.)", + order_number: 1) + Instruction.create!(experiment_id: experiment.id, + information: "Mix the salt, water, and Dawn detergent in a glass or small + bowl. Set the mixture aside. This is your extraction liquid.", + order_number: 2) + Instruction.create!(experiment_id: experiment.id, + information: "Line the funnel with the cheesecloth, and put the funnel's + tube into the glass.", + order_number: 3) experiment_two = Experiment.create!(user_id: user_two.id, name: "How To Make A Spark", @@ -37,19 +37,236 @@ down between a cloud and the ground.", youtube_link: "https://www.youtube.com/watch?v=XtE0uXGMC-0", complete_time: 1) - mat_four= Material.create!(experiment_id: experiment_two.id, item: "pencil with erasser") - mat_five= Material.create!(experiment_id: experiment_two.id, item: "aluminum tray") - mat_six= Material.create!(experiment_id: experiment_two.id, item: "wool cloth") - - instruction_four = Instruction.create!(experiment_id: experiment_two.id, - information: "Stick a pushpin through the center of the aluminum tray - then stuck the pencil eraser to the pushpin.", - order: 1) - instruction_five = Instruction.create!(experiment_id: experiment_two.id, - information: "Vigorously rub the wool on the Styrofoam tray for two minutes. - It really takes two solid minutes!", - order: 2) - instruction_six = Instruction.create!(experiment_id: experiment_two.id, - information: "Finally, picke up the aluminum tray using the pencil handle - and set it on the Styrofoam plate.", - order: 3) + Material.create!(experiment_id: experiment_two.id, item: "pencil with erasser") + Material.create!(experiment_id: experiment_two.id, item: "aluminum tray") + Material.create!(experiment_id: experiment_two.id, item: "wool cloth") + + Instruction.create!(experiment_id: experiment_two.id, + information: "Stick a pushpin through the center of the aluminum tray + then stuck the pencil eraser to the pushpin.", + order_number: 1) + Instruction.create!(experiment_id: experiment_two.id, + information: "Vigorously rub the wool on the Styrofoam tray for two minutes. + It really takes two solid minutes!", + order_number: 2) + Instruction.create!(experiment_id: experiment_two.id, + information: "Finally, picke up the aluminum tray using the pencil handle + and set it on the Styrofoam plate.", + order_number: 3) + +experiment_fifteen = Experiment.create!(user_id: user_two.id, name: "Yeast", + description: "Does yeast seem alive to you? Well, it is. It just needs warmth + and sugar to become active. Yeasts are living things that are so small only have + one cell. They can't make their own food. So, if you don't give them food, + they don't become active. It's almost like they're asleep. If you make it warm + and give them some food they become active.", + youtube_link: "https://www.youtube.com/watch?v=odxvp-3nSw4", complete_time: 1.5) + + Material.create!(experiment_id: experiment_fifteen.id, item: "1 package of yeast") + Material.create!(experiment_id: experiment_fifteen.id, item: "warm water") + Material.create!(experiment_id: experiment_fifteen.id, item: "1 teaspoon sugar") + Material.create!(experiment_id: experiment_fifteen.id, item: "spoons") + Material.create!(experiment_id: experiment_fifteen.id, item: "large bowl") + + Instruction.create!(experiment_id: experiment_fifteen.id, + information: "Pour one package of yeast in a large bowl.", order_number: 1) + Instruction.create!(experiment_id: experiment_fifteen.id, + information: "Add 1/4 cup of warm water and 1 teaspoon sugar.", order_number: 2) + Instruction.create!(experiment_id: experiment_fifteen.id, + information: "Now wait about 10 minutes. When you check it, you should see bubbles.", + order_number: 3) + +experiment_sixteen = Experiment.create!(user_id: user.id, name: "Soap Powered Boat", + description: "Argh, ye landlubbers. Sail the soapy seas with this activity + full of high and low surface tension.", + youtube_link: "https://www.youtube.com/watch?v=qz9hkWhZfRM", complete_time: 1.5) + + Material.create!(experiment_id: experiment_sixteen.id, item: "4 Styrofoam plates") + Material.create!(experiment_id: experiment_sixteen.id, item: "2 Styrofoam bowls") + Material.create!(experiment_id: experiment_sixteen.id, item: "2 Styrofoam cups") + Material.create!(experiment_id: experiment_sixteen.id, item: "2 bendy straws") + Material.create!(experiment_id: experiment_sixteen.id, item: "glue") + Material.create!(experiment_id: experiment_sixteen.id, item: "water") + Material.create!(experiment_id: experiment_sixteen.id, item: "liquid dish soap") + Material.create!(experiment_id: experiment_sixteen.id, item: "inflatable wading + pool or bathtub filled with water") + + Instruction.create!(experiment_id: experiment_sixteen.id, + information: "To make a boat, glue two plates together face to face so that + their top edges meet.", order_number: 1) + Instruction.create!(experiment_id: experiment_sixteen.id, + information: "Glue the bowl upside down on top of one of the plates", order_number: 2) + Instruction.create!(experiment_id: experiment_sixteen.id, + information: "Poke a hole near the bottom of the cup and glue the bottom + of the cup to the bottom of the bowl.", order_number: 3) + Instruction.create!(experiment_id: experiment_sixteen.id, + information: "Put the short end of the bendy straw through the hole in the + cup. The other end of the straw should point down.", order_number: 4) + Instruction.create!(experiment_id: experiment_sixteen.id, + information: "Make two boats. When the glue dries, decorate your boats with + paint or markers.", order_number: 5) + Instruction.create!(experiment_id: experiment_sixteen.id, + information: "To make your boat move, just set it on the water, pour water + into the cup and watch it go.", order_number: 6) + Instruction.create!(experiment_id: experiment_sixteen.id, + information: "Make an index card boat move throught the water using only + diswashing soap. Mix xome liquid dishwashing soap with water and pur it + into the cup on top of one boat. Pour plain water into the cup on the other + boat.", order_number: 7) + +experiment_seventeen = Experiment.create!(user_id: user_two.id, name: "Solar Still", + description: "Water evaporates in the same way from lakes, rivers, and oceans. + The water heats up, turns into a gas, and then condenses to fall back down + as rain and.", + youtube_link: "https://www.youtube.com/watch?v=m408EZTGD64", complete_time: 2) + + Material.create!(experiment_id: experiment_seventeen.id, item: "large bowl") + Material.create!(experiment_id: experiment_seventeen.id, item: "short glass or cup") + Material.create!(experiment_id: experiment_seventeen.id, item: "tape") + Material.create!(experiment_id: experiment_seventeen.id, item: "plastic wrap") + Material.create!(experiment_id: experiment_seventeen.id, item: "small rock") + Material.create!(experiment_id: experiment_seventeen.id, item: "pitcher of water") + Material.create!(experiment_id: experiment_seventeen.id, item: "salt") + Material.create!(experiment_id: experiment_seventeen.id, item: "long spoon for stirring") + + Instruction.create!(experiment_id: experiment_seventeen.id, + information: "First make saltwater by adding salt to fresh water. Stir the + water until the salt dissolves.", order_number: 1) + Instruction.create!(experiment_id: experiment_seventeen.id, + information: "Now pour about two inches of saltwater in a large bowl.", + order_number: 2) + Instruction.create!(experiment_id: experiment_seventeen.id, + information: "Take an empty glass and put it in the bowl. The top of the glass + should be shorter than the top of the bowl, but higher than the saltwater.", + order_number: 3) + Instruction.create!(experiment_id: experiment_seventeen.id, + information: "Put plastic wrap over the top of the bowl. You may need to use + tape to make sure the seal is tight.", + order_number: 4) + Instruction.create!(experiment_id: experiment_seventeen.id, + information: "The last step is to put something heavy right in the center of + the plastic wrap, over the empty glass. That will weigh the plastic down + and help you collect the water. Now you've made a solar still. It's called + a still because it distills, or purifies, water.", + order_number: 5) + Instruction.create!(experiment_id: experiment_seventeen.id, + information: "Leave your still outside in the sun. Leave it alone for a few + hours, or even a whole day. The longer you leave it out, the more water + you'll collect.", + order_number: 6) + Instruction.create!(experiment_id: experiment_seventeen.id, + information: "When you're ready to check your still, take the plastic wrap + off and look at the water that's collected in the cup. Do you think it's + salty or fresh? Taste it, or use a saltwater tester to find out!", + order_number: 7) + +experiment_eighteen = Experiment.create!(user_id: user.id, name: "Static Electricity", + description: "They say opposites attract and that couldn't be truer with these + fun static electricity experiments. Find out about positively and negatively + charged particles using a few basic items, can you control if they will be + attracted or unattracted to each other?", + youtube_link: "https://www.youtube.com/watch?v=-w-GoSJpvdw", complete_time: 0.5) + + Material.create!(experiment_id: experiment_eighteen.id, item: "2 inflated + balloons with string attached") + Material.create!(experiment_id: experiment_eighteen.id, item: "Your hair") + Material.create!(experiment_id: experiment_eighteen.id, item: "Aluminium can") + Material.create!(experiment_id: experiment_eighteen.id, item: "Woolen fabric") + + Instruction.create!(experiment_id: experiment_seventeen.id, + information: "Rub the 2 balloons one by one against the woolen fabric, then + try moving the balloons together, do they want to or are they unattracted + to each other?", + order_number: 1) + Instruction.create!(experiment_id: experiment_seventeen.id, + information: "Rub 1 of the balloons back and forth on your hair then slowly + it pull it away, ask someone nearby what they can see or if there's nobody + else around try looking in a mirror.", + order_number: 2) + Instruction.create!(experiment_id: experiment_seventeen.id, + information: "Put the aluminium can on its side on a table, after rubbing the + balloon on your hair again hold the balloon close to the can and watch as it + rolls towards it, slowly move the balloon away from the can and it will follow.", + order_number: 3) + +experiment_nineteen = Experiment.create!(user_id: user_two.id, name: "Solar Oven", + description: "Use the sun's energy to heat up a tasty treat with this simple + solar oven! Have you ever heard the expression that it's so hot out you could + fry an egg on the sidewalk? Have you ever wondered if it's true? Find out with + this easy, fun, and delicious solar oven science project that uses only household + items and a pizza box. Plus, learn about absorption, insulation, and the sun's energy.", + youtube_link: "https://www.youtube.com/watch?v=xZJmz_tF4NU", complete_time: 2) + + Material.create!(experiment_id: experiment_nineteen.id, item: "Cardboard pizza + box (the kind delivered pizza comes in") + Material.create!(experiment_id: experiment_nineteen.id, item: "Box knife or scissors") + Material.create!(experiment_id: experiment_nineteen.id, item: "Aluminum foil") + Material.create!(experiment_id: experiment_nineteen.id, item: "Clear tape") + Material.create!(experiment_id: experiment_nineteen.id, item: "Plastic wrap + (a heavy-duty or freezer zip lock bag will also work)") + Material.create!(experiment_id: experiment_nineteen.id, item: "Black construction paper") + Material.create!(experiment_id: experiment_nineteen.id, item: "Newspapers") + Material.create!(experiment_id: experiment_nineteen.id, item: "Ruler, or wooden spoon") + Material.create!(experiment_id: experiment_nineteen.id, item: "Thermometer") + + Instruction.create!(experiment_id: experiment_nineteen.id, + information: "Use a box knife or sharp scissors to cut a flap in the lid of + the pizza box. Cut along three sides, leaving about an inch between the + sides of the flap and the edges of the lid. Fold this flap out so that it + stands up when the box lid is closed.", + order_number: 1) + Instruction.create!(experiment_id: experiment_nineteen.id, + information: "Cover the inner side of the flap with aluminum foil so that it + will reflect rays from the sun. To do this, tightly wrap foil around the + flap, then tape it to the back, or outer side of the flap.", + order_number: 2) + Instruction.create!(experiment_id: experiment_nineteen.id, + information: "Use clear plastic wrap to create an airtight window for sunlight + to enter into the box. Do this by opening the box and taping a double layer + of plastic wrap over the opening you made when you cut the flap in the lid. + Leave about an inch of plastic overlap around the sides and tape each side + down securely, sealing out air. If you use a plastic bag, cut out a square + big enough to cover the opening, and tape one layer over the opening.", + order_number: 3) + Instruction.create!(experiment_id: experiment_nineteen.id, + information: "Line the bottom of the box with black construction paper—black + absorbs heat. The black surface is where your food will be set to cook. How + much you need will depend on the size of the pizza box you're using to make + your solar oven. ", + order_number: 4) + Instruction.create!(experiment_id: experiment_nineteen.id, + information: "To insulate your oven so it holds in more heat, roll up sheets + of newspaper and place them on the bottom of the box. Tape them down so + that they form a border around the cooking area. It may be helpful to also + tape the rolls closed first. The newspaper rolls should make it so that the + lid can still close, but there is a seal inside of the box, so air cannot + escape.", + order_number: 5) + Instruction.create!(experiment_id: experiment_nineteen.id, + information: "The best hours to set up your solar oven are when the sun is high + overhead—from 11 am to 3 pm. Take it outside to a sunny spot and adjust the + flap until the most sunlight possible is reflecting off the aluminum foil + and onto the plastic-covered window. Use a ruler to prop the flap at the + right angle. You may want to angle the entire box by using a rolled up towel.", + order_number: 6) + Instruction.create!(experiment_id: experiment_nineteen.id, + information: "You can make toast by buttering a slice of bread then letting + the sun do the rest. Cooking a hot dog or making nachos with chips and cheese + are also fun treats to make in your solar oven! It would also work great + to heat up leftovers. So the paper at the bottom doesn't get dirty, put + what you would like to cook on a clear plastic or glass plate. A pie plate + would work well. Place the thermometer inside your oven before you close + it, so you can check the temperature.", + order_number: 7) + Instruction.create!(experiment_id: experiment_nineteen.id, + information: "To take food out of the oven, open up the lid of the pizza box, + and using oven mitts or potholders, lift the glass dish out of the oven.", + order_number: 8) + +# Concept.create!(name: "Solar")#solar_oven, +# Concept.create!(name: "Water")#Soap Powered Boat +# ConceptRelationship.create!(parent_id: "#{experiment_nineteen.id}", child_id: "#{experiment_sixteen.id}")#solar_oven, Soap Powered Boat + +# (parent_id: experiment_sixteen.id, child_id: experiment_eighteen.id)#Soap Powered Boat +# Concept.create!(name: "Electricity") +# (parent_id: experiment_eighteen.id, child_id: ) # Static Electricity diff --git a/public/404.html b/public/404.html index b612547..f9eaad5 100644 --- a/public/404.html +++ b/public/404.html @@ -19,13 +19,13 @@ } div.dialog > div { - border: 1px solid #CCC; - border-right-color: #999; - border-left-color: #999; - border-bottom-color: #BBB; - border-top: #B00100 solid 4px; - border-top-left-radius: 9px; - border-top-right-radius: 9px; + border_number: 1px solid #CCC; + border_number-right-color: #999; + border_number-left-color: #999; + border_number-bottom-color: #BBB; + border_number-top: #B00100 solid 4px; + border_number-top-left-radius: 9px; + border_number-top-right-radius: 9px; background-color: white; padding: 7px 12% 0; box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17); @@ -41,13 +41,13 @@ margin: 0 0 1em; padding: 1em; background-color: #F7F7F7; - border: 1px solid #CCC; - border-right-color: #999; - border-left-color: #999; - border-bottom-color: #999; - border-bottom-left-radius: 4px; - border-bottom-right-radius: 4px; - border-top-color: #DADADA; + border_number: 1px solid #CCC; + border_number-right-color: #999; + border_number-left-color: #999; + border_number-bottom-color: #999; + border_number-bottom-left-radius: 4px; + border_number-bottom-right-radius: 4px; + border_number-top-color: #DADADA; color: #666; box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17); } diff --git a/public/422.html b/public/422.html index a21f82b..f604b40 100644 --- a/public/422.html +++ b/public/422.html @@ -19,13 +19,13 @@ } div.dialog > div { - border: 1px solid #CCC; - border-right-color: #999; - border-left-color: #999; - border-bottom-color: #BBB; - border-top: #B00100 solid 4px; - border-top-left-radius: 9px; - border-top-right-radius: 9px; + border_number: 1px solid #CCC; + border_number-right-color: #999; + border_number-left-color: #999; + border_number-bottom-color: #BBB; + border_number-top: #B00100 solid 4px; + border_number-top-left-radius: 9px; + border_number-top-right-radius: 9px; background-color: white; padding: 7px 12% 0; box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17); @@ -41,13 +41,13 @@ margin: 0 0 1em; padding: 1em; background-color: #F7F7F7; - border: 1px solid #CCC; - border-right-color: #999; - border-left-color: #999; - border-bottom-color: #999; - border-bottom-left-radius: 4px; - border-bottom-right-radius: 4px; - border-top-color: #DADADA; + border_number: 1px solid #CCC; + border_number-right-color: #999; + border_number-left-color: #999; + border_number-bottom-color: #999; + border_number-bottom-left-radius: 4px; + border_number-bottom-right-radius: 4px; + border_number-top-color: #DADADA; color: #666; box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17); } diff --git a/public/500.html b/public/500.html index 061abc5..2c2d0c8 100644 --- a/public/500.html +++ b/public/500.html @@ -19,13 +19,13 @@ } div.dialog > div { - border: 1px solid #CCC; - border-right-color: #999; - border-left-color: #999; - border-bottom-color: #BBB; - border-top: #B00100 solid 4px; - border-top-left-radius: 9px; - border-top-right-radius: 9px; + border_number: 1px solid #CCC; + border_number-right-color: #999; + border_number-left-color: #999; + border_number-bottom-color: #BBB; + border_number-top: #B00100 solid 4px; + border_number-top-left-radius: 9px; + border_number-top-right-radius: 9px; background-color: white; padding: 7px 12% 0; box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17); @@ -41,13 +41,13 @@ margin: 0 0 1em; padding: 1em; background-color: #F7F7F7; - border: 1px solid #CCC; - border-right-color: #999; - border-left-color: #999; - border-bottom-color: #999; - border-bottom-left-radius: 4px; - border-bottom-right-radius: 4px; - border-top-color: #DADADA; + border_number: 1px solid #CCC; + border_number-right-color: #999; + border_number-left-color: #999; + border_number-bottom-color: #999; + border_number-bottom-left-radius: 4px; + border_number-bottom-right-radius: 4px; + border_number-top-color: #DADADA; color: #666; box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17); } diff --git a/test/controllers/instructions_controller_test.rb b/test/controllers/instructions_controller_test.rb index 58062c6..f469dcc 100644 --- a/test/controllers/instructions_controller_test.rb +++ b/test/controllers/instructions_controller_test.rb @@ -20,7 +20,7 @@ class InstructionsControllerTest < ActionController::TestCase test "should create instruction" do assert_difference('Instruction.count') do - post :create, instruction: { id: @instruction.id, experiment_id: @experiment_id, order: @instruction.order, information: @instruction.information } + post :create, instruction: { id: @instruction.id, experiment_id: @experiment_id, order_number: @instruction.order_number, information: @instruction.information } end assert_redirected_to instruction_path(assigns(:instruction)) @@ -37,7 +37,7 @@ class InstructionsControllerTest < ActionController::TestCase end test "should update instruction" do - patch :update, id: @instruction, instruction: { experiment_id: @instruction.experiment_id, order: @instruction.order, information: @instruction.information } + patch :update, id: @instruction, instruction: { experiment_id: @instruction.experiment_id, order_number: @instruction.order_number, information: @instruction.information } assert_redirected_to instruction_path(assigns(:instruction)) end diff --git a/test/fixtures/instructions.yml b/test/fixtures/instructions.yml index c0db40c..1087033 100644 --- a/test/fixtures/instructions.yml +++ b/test/fixtures/instructions.yml @@ -3,9 +3,9 @@ one: experiment_id: 1 information: MyText - order: 1 + order_number: 1 two: experiment_id: 1 information: MyText - order: 2 + order_number: 2 diff --git a/test/test_helper.rb b/test/test_helper.rb index 1841fa8..ff687c9 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -4,7 +4,7 @@ require 'minitest/pride' class ActiveSupport::TestCase - # Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order. + # Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order_number. fixtures :all # Add more helper methods to be used by all tests here...