add survey
This commit is contained in:
3
app/assets/javascripts/origami/surveys.coffee
Normal file
3
app/assets/javascripts/origami/surveys.coffee
Normal file
@@ -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://coffeescript.org/
|
||||
3
app/assets/stylesheets/origami/surveys.scss
Normal file
3
app/assets/stylesheets/origami/surveys.scss
Normal file
@@ -0,0 +1,3 @@
|
||||
// Place all the styles related to the Origami/Surveys controller here.
|
||||
// They will automatically be included in application.css.
|
||||
// You can use Sass (SCSS) here: http://sass-lang.com/
|
||||
2
app/controllers/origami/surveys_controller.rb
Normal file
2
app/controllers/origami/surveys_controller.rb
Normal file
@@ -0,0 +1,2 @@
|
||||
class Origami::SurveysController < ApplicationController
|
||||
end
|
||||
2
app/helpers/origami/surveys_helper.rb
Normal file
2
app/helpers/origami/surveys_helper.rb
Normal file
@@ -0,0 +1,2 @@
|
||||
module Origami::SurveysHelper
|
||||
end
|
||||
2
app/models/survey.rb
Normal file
2
app/models/survey.rb
Normal file
@@ -0,0 +1,2 @@
|
||||
class Survey < ApplicationRecord
|
||||
end
|
||||
@@ -415,4 +415,3 @@
|
||||
});
|
||||
});
|
||||
</script> -->
|
||||
>>>>>>> 01c4eeca81e1eac7bf7fe5854142a9663e104249
|
||||
|
||||
20
db/migrate/20171106110505_create_surveys.rb
Normal file
20
db/migrate/20171106110505_create_surveys.rb
Normal file
@@ -0,0 +1,20 @@
|
||||
class CreateSurveys < ActiveRecord::Migration[5.1]
|
||||
def change
|
||||
create_table :surveys do |t|
|
||||
t.string :dining_name
|
||||
t.string :receipt_no
|
||||
t.integer :shift_id
|
||||
t.string :created_by
|
||||
t.integer :child
|
||||
t.integer :adult
|
||||
t.integer :male
|
||||
t.integer :female
|
||||
t.json :foreigner
|
||||
t.integer :local
|
||||
t.integer :total_customer
|
||||
t.decimal :total_amount
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
5
spec/controllers/origami/surveys_controller_spec.rb
Normal file
5
spec/controllers/origami/surveys_controller_spec.rb
Normal file
@@ -0,0 +1,5 @@
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe Origami::SurveysController, type: :controller do
|
||||
|
||||
end
|
||||
15
spec/helpers/origami/surveys_helper_spec.rb
Normal file
15
spec/helpers/origami/surveys_helper_spec.rb
Normal file
@@ -0,0 +1,15 @@
|
||||
require 'rails_helper'
|
||||
|
||||
# Specs in this file have access to a helper object that includes
|
||||
# the Origami::SurveysHelper. For example:
|
||||
#
|
||||
# describe Origami::SurveysHelper do
|
||||
# describe "string concat" do
|
||||
# it "concats two strings with spaces" do
|
||||
# expect(helper.concat_strings("this","that")).to eq("this that")
|
||||
# end
|
||||
# end
|
||||
# end
|
||||
RSpec.describe Origami::SurveysHelper, type: :helper do
|
||||
pending "add some examples to (or delete) #{__FILE__}"
|
||||
end
|
||||
5
spec/models/survey_spec.rb
Normal file
5
spec/models/survey_spec.rb
Normal file
@@ -0,0 +1,5 @@
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe Survey, type: :model do
|
||||
pending "add some examples to (or delete) #{__FILE__}"
|
||||
end
|
||||
Reference in New Issue
Block a user