for pull
This commit is contained in:
2
.idea/.generators
generated
2
.idea/.generators
generated
@@ -5,4 +5,4 @@ You are allowed to:
|
||||
2. Remove generators
|
||||
3. Add installed generators
|
||||
To add new installed generators automatically delete this file and reload the project.
|
||||
--><GeneratorsGroup><Generator name="assets" /><Generator name="cancan:ability" /><Generator name="channel" /><Generator name="coffee:assets" /><Generator name="controller" /><Generator name="factory_girl:model" /><Generator name="generator" /><Generator name="helper" /><Generator name="integration_test" /><Generator name="jbuilder" /><Generator name="job" /><Generator name="js:assets" /><Generator name="kaminari:config" /><Generator name="kaminari:views" /><Generator name="mailer" /><Generator name="migration" /><Generator name="model" /><Generator name="resource" /><Generator name="rspec:controller" /><Generator name="rspec:feature" /><Generator name="rspec:helper" /><Generator name="rspec:install" /><Generator name="rspec:integration" /><Generator name="rspec:job" /><Generator name="rspec:mailer" /><Generator name="rspec:model" /><Generator name="rspec:observer" /><Generator name="rspec:request" /><Generator name="rspec:scaffold" /><Generator name="rspec:view" /><Generator name="scaffold" /><Generator name="scaffold_controller" /><Generator name="sidekiq:worker" /><Generator name="simple_form:install" /><Generator name="system_test" /><Generator name="task" /><Generator name="test_unit:controller" /><Generator name="test_unit:generator" /><Generator name="test_unit:helper" /><Generator name="test_unit:integration" /><Generator name="test_unit:job" /><Generator name="test_unit:mailer" /><Generator name="test_unit:model" /><Generator name="test_unit:plugin" /><Generator name="test_unit:scaffold" /><Generator name="test_unit:system" /></GeneratorsGroup></Settings>
|
||||
--><GeneratorsGroup><Generator name="assets" /><Generator name="cancan:ability" /><Generator name="channel" /><Generator name="coffee:assets" /><Generator name="controller" /><Generator name="factory_girl:model" /><Generator name="generator" /><Generator name="helper" /><Generator name="integration_test" /><Generator name="jbuilder" /><Generator name="job" /><Generator name="js:assets" /><Generator name="kaminari:config" /><Generator name="kaminari:views" /><Generator name="mailer" /><Generator name="migration" /><Generator name="model" /><Generator name="resource" /><Generator name="rspec:controller" /><Generator name="rspec:feature" /><Generator name="rspec:helper" /><Generator name="rspec:install" /><Generator name="rspec:integration" /><Generator name="rspec:job" /><Generator name="rspec:mailer" /><Generator name="rspec:model" /><Generator name="rspec:observer" /><Generator name="rspec:request" /><Generator name="rspec:scaffold" /><Generator name="rspec:view" /><Generator name="scaffold" /><Generator name="scaffold_controller" /><Generator name="sidekiq:worker" /><Generator name="simple_form:install" /><Generator name="system_test" /><Generator name="task" /><Generator name="test_unit:controller" /><Generator name="test_unit:generator" /><Generator name="test_unit:helper" /><Generator name="test_unit:integration" /><Generator name="test_unit:job" /><Generator name="test_unit:mailer" /><Generator name="test_unit:model" /><Generator name="test_unit:plugin" /><Generator name="test_unit:scaffold" /><Generator name="test_unit:system" /><Generator name="uploader" /></GeneratorsGroup></Settings>
|
||||
|
||||
1
.idea/sxrestaurant.iml
generated
1
.idea/sxrestaurant.iml
generated
@@ -142,6 +142,7 @@
|
||||
<orderEntry type="library" scope="PROVIDED" name="bundler (v1.14.6, rbenv: 2.3.3) [gem]" level="application" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="byebug (v9.0.6, rbenv: 2.3.3) [gem]" level="application" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="cancancan (v1.17.0, rbenv: 2.3.3) [gem]" level="application" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="carrierwave (v1.1.0, rbenv: 2.3.3) [gem]" level="application" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="chronic (v0.10.2, rbenv: 2.3.3) [gem]" level="application" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="coffee-rails (v4.2.2, rbenv: 2.3.3) [gem]" level="application" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="coffee-script (v2.4.1, rbenv: 2.3.3) [gem]" level="application" />
|
||||
|
||||
182
.idea/workspace.xml
generated
182
.idea/workspace.xml
generated
@@ -2,30 +2,8 @@
|
||||
<project version="4">
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="89ca96af-a0e4-4fe4-b9a3-9969f22d7079" name="Default" comment="">
|
||||
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/app/assets/javascripts/commissioners.coffee" />
|
||||
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/app/assets/stylesheets/commissioners.scss" />
|
||||
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/app/controllers/commissioners_controller.rb" />
|
||||
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/app/helpers/commissioners_helper.rb" />
|
||||
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/app/models/commissioner.rb" />
|
||||
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/app/views/commissioners/_commissioner.json.jbuilder" />
|
||||
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/app/views/commissioners/_form.html.erb" />
|
||||
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/app/views/commissioners/edit.html.erb" />
|
||||
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/app/views/commissioners/index.html.erb" />
|
||||
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/app/views/commissioners/index.json.jbuilder" />
|
||||
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/app/views/commissioners/new.html.erb" />
|
||||
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/app/views/commissioners/show.html.erb" />
|
||||
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/app/views/commissioners/show.json.jbuilder" />
|
||||
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/db/migrate/20170818090115_create_commissioners.rb" />
|
||||
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/spec/controllers/commissioners_controller_spec.rb" />
|
||||
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/spec/helpers/commissioners_helper_spec.rb" />
|
||||
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/spec/models/commissioner_spec.rb" />
|
||||
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/spec/requests/commissioners_spec.rb" />
|
||||
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/spec/routing/commissioners_routing_spec.rb" />
|
||||
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/spec/views/commissioners/edit.html.erb_spec.rb" />
|
||||
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/spec/views/commissioners/index.html.erb_spec.rb" />
|
||||
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/spec/views/commissioners/new.html.erb_spec.rb" />
|
||||
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/spec/views/commissioners/show.html.erb_spec.rb" />
|
||||
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/test/system/commissioners_test.rb" />
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/.generators" afterPath="$PROJECT_DIR$/.idea/.generators" />
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/sxrestaurant.iml" afterPath="$PROJECT_DIR$/.idea/sxrestaurant.iml" />
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/config/routes.rb" afterPath="$PROJECT_DIR$/config/routes.rb" />
|
||||
</list>
|
||||
@@ -47,18 +25,18 @@
|
||||
<file leaf-file-name="20170818090115_create_commissioners.rb" pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/db/migrate/20170818090115_create_commissioners.rb">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="144">
|
||||
<caret line="8" column="18" lean-forward="true" selection-start-line="8" selection-start-column="18" selection-end-line="8" selection-end-column="18" />
|
||||
<state relative-caret-position="126">
|
||||
<caret line="7" column="26" lean-forward="true" selection-start-line="3" selection-start-column="6" selection-end-line="7" selection-end-column="26" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="20170403155230_create_employees.rb" pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/db/migrate/20170403155230_create_employees.rb">
|
||||
<file leaf-file-name="20170821093252_create_commissions.rb" pinned="false" current-in-tab="true">
|
||||
<entry file="file://$PROJECT_DIR$/db/migrate/20170821093252_create_commissions.rb">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="126">
|
||||
<caret line="7" column="28" lean-forward="false" selection-start-line="7" selection-start-column="28" selection-end-line="7" selection-end-column="28" />
|
||||
<state relative-caret-position="72">
|
||||
<caret line="4" column="23" lean-forward="true" selection-start-line="4" selection-start-column="23" selection-end-line="4" selection-end-column="23" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
@@ -68,7 +46,7 @@
|
||||
<entry file="file://$PROJECT_DIR$/app/controllers/commissioners_controller.rb">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="54">
|
||||
<caret line="48" column="88" lean-forward="true" selection-start-line="48" selection-start-column="88" selection-end-line="48" selection-end-column="88" />
|
||||
<caret line="48" column="88" lean-forward="false" selection-start-line="48" selection-start-column="88" selection-end-line="48" selection-end-column="88" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
@@ -78,18 +56,50 @@
|
||||
<entry file="file://$PROJECT_DIR$/app/models/commissioner.rb">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="0">
|
||||
<caret line="0" column="38" lean-forward="true" selection-start-line="0" selection-start-column="38" selection-end-line="0" selection-end-column="38" />
|
||||
<caret line="0" column="38" lean-forward="false" selection-start-line="0" selection-start-column="38" selection-end-line="0" selection-end-column="38" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="routes.rb" pinned="false" current-in-tab="true">
|
||||
<file leaf-file-name="routes.rb" pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/config/routes.rb">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="126">
|
||||
<caret line="83" column="43" lean-forward="false" selection-start-line="83" selection-start-column="43" selection-end-line="83" selection-end-column="43" />
|
||||
<folding />
|
||||
<state relative-caret-position="216">
|
||||
<caret line="89" column="47" lean-forward="false" selection-start-line="89" selection-start-column="47" selection-end-line="89" selection-end-column="47" />
|
||||
<folding>
|
||||
<marker date="1503307972000" expanded="true" signature="163:279" ph="##..." />
|
||||
<marker date="1503307972000" expanded="true" signature="719:2306" ph="do ... end" />
|
||||
<marker date="1503307972000" expanded="true" signature="882:1273" ph="do ... end" />
|
||||
<marker date="1503307972000" expanded="true" signature="1470:1515" ph="do ... end" />
|
||||
<marker date="1503307972000" expanded="true" signature="1934:2298" ph="do ... end" />
|
||||
<marker date="1503307972000" expanded="true" signature="2364:7066" ph="do ... end" />
|
||||
<marker date="1503307972000" expanded="true" signature="2524:2690" ph="do ... end" />
|
||||
<marker date="1503307972000" expanded="true" signature="2527:2636" ph="do ... end" />
|
||||
<marker date="1503307972000" expanded="true" signature="3418:3480" ph="##..." />
|
||||
<marker date="1503307972000" expanded="true" signature="4350:4500" ph="##..." />
|
||||
<marker date="1503307972000" expanded="true" signature="4554:4831" ph="##..." />
|
||||
<marker date="1503307972000" expanded="true" signature="6646:6710" ph="##..." />
|
||||
<marker date="1503307972000" expanded="true" signature="7138:7187" ph="do ... end" />
|
||||
<marker date="1503307972000" expanded="true" signature="7147:7181" ph="do ... end" />
|
||||
<marker date="1503307972000" expanded="true" signature="7266:7798" ph="do ... end" />
|
||||
<marker date="1503307972000" expanded="true" signature="7864:8356" ph="do ... end" />
|
||||
<marker date="1503307972000" expanded="true" signature="8334:8350" ph="do ... end" />
|
||||
<marker date="1503307972000" expanded="true" signature="8423:9890" ph="do ... end" />
|
||||
<marker date="1503307972000" expanded="true" signature="8497:8601" ph="do ... end" />
|
||||
<marker date="1503307972000" expanded="true" signature="8730:8855" ph="do ... end" />
|
||||
<marker date="1503307972000" expanded="true" signature="8739:8780" ph="do ... end" />
|
||||
<marker date="1503307972000" expanded="true" signature="8890:8937" ph="do ... end" />
|
||||
<marker date="1503307972000" expanded="true" signature="8968:9015" ph="do ... end" />
|
||||
<marker date="1503307972000" expanded="true" signature="9314:9360" ph="##..." />
|
||||
<marker date="1503307972000" expanded="true" signature="9397:9467" ph="do ... end" />
|
||||
<marker date="1503307972000" expanded="true" signature="9663:9841" ph="do ... end" />
|
||||
<marker date="1503307972000" expanded="true" signature="9704:9750" ph="do ... end" />
|
||||
<marker date="1503307972000" expanded="true" signature="9787:9833" ph="do ... end" />
|
||||
<marker date="1503307972000" expanded="true" signature="9967:10338" ph="do ... end" />
|
||||
<marker date="1503307972000" expanded="true" signature="10416:10810" ph="do ... end" />
|
||||
<marker date="1503307972000" expanded="true" signature="10814:11124" ph="##..." />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
@@ -125,13 +135,14 @@
|
||||
<option value="$PROJECT_DIR$/app/views/home/show.html.erb" />
|
||||
<option value="$PROJECT_DIR$/app/models/ability.rb" />
|
||||
<option value="$PROJECT_DIR$/app/views/home/dashboard.html.erb" />
|
||||
<option value="$PROJECT_DIR$/config/routes.rb" />
|
||||
<option value="$PROJECT_DIR$/app/views/origami/sale_edit/edit.html.erb" />
|
||||
<option value="$PROJECT_DIR$/app/controllers/origami/sale_edit_controller.rb" />
|
||||
<option value="$PROJECT_DIR$/.gitignore" />
|
||||
<option value="$PROJECT_DIR$/db/migrate/20170818051922_create_commissioner.rb" />
|
||||
<option value="$PROJECT_DIR$/app/models/sale.rb" />
|
||||
<option value="$PROJECT_DIR$/db/migrate/20170818090115_create_commissioners.rb" />
|
||||
<option value="$PROJECT_DIR$/config/routes.rb" />
|
||||
<option value="$PROJECT_DIR$/db/migrate/20170821093252_create_commissions.rb" />
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
@@ -644,12 +655,12 @@
|
||||
<workItem from="1498465879846" duration="18792000" />
|
||||
<workItem from="1502681128282" duration="12098000" />
|
||||
<workItem from="1502780405774" duration="8876000" />
|
||||
<workItem from="1503287439872" duration="1874000" />
|
||||
<workItem from="1503287439872" duration="4290000" />
|
||||
</task>
|
||||
<servers />
|
||||
</component>
|
||||
<component name="TimeTrackingManager">
|
||||
<option name="totallyTimeSpent" value="48609000" />
|
||||
<option name="totallyTimeSpent" value="51025000" />
|
||||
</component>
|
||||
<component name="ToolWindowManager">
|
||||
<frame x="1440" y="22" width="1920" height="724" extended-state="0" />
|
||||
@@ -686,7 +697,6 @@
|
||||
<watches-manager />
|
||||
</component>
|
||||
<component name="editorHistoryManager">
|
||||
<entry file="file://$PROJECT_DIR$/app/models/sale_payment.rb" />
|
||||
<entry file="file://$PROJECT_DIR$/app/controllers/origami/void_controller.rb" />
|
||||
<entry file="file://$PROJECT_DIR$/app/views/origami/home/index.html.erb" />
|
||||
<entry file="file://$PROJECT_DIR$/app/views/origami/home/show.html.erb" />
|
||||
@@ -769,42 +779,82 @@
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/db/migrate/20170403155230_create_employees.rb">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="126">
|
||||
<caret line="7" column="28" lean-forward="false" selection-start-line="7" selection-start-column="28" selection-end-line="7" selection-end-column="28" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/db/migrate/20170818090115_create_commissioners.rb">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="144">
|
||||
<caret line="8" column="18" lean-forward="true" selection-start-line="8" selection-start-column="18" selection-end-line="8" selection-end-column="18" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/app/controllers/commissioners_controller.rb">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="54">
|
||||
<caret line="48" column="88" lean-forward="true" selection-start-line="48" selection-start-column="88" selection-end-line="48" selection-end-column="88" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/app/models/commissioner.rb">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="0">
|
||||
<caret line="0" column="38" lean-forward="true" selection-start-line="0" selection-start-column="38" selection-end-line="0" selection-end-column="38" />
|
||||
<caret line="0" column="38" lean-forward="false" selection-start-line="0" selection-start-column="38" selection-end-line="0" selection-end-column="38" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/config/routes.rb">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="216">
|
||||
<caret line="89" column="47" lean-forward="false" selection-start-line="89" selection-start-column="47" selection-end-line="89" selection-end-column="47" />
|
||||
<folding>
|
||||
<marker date="1503307972000" expanded="true" signature="163:279" ph="##..." />
|
||||
<marker date="1503307972000" expanded="true" signature="719:2306" ph="do ... end" />
|
||||
<marker date="1503307972000" expanded="true" signature="882:1273" ph="do ... end" />
|
||||
<marker date="1503307972000" expanded="true" signature="1470:1515" ph="do ... end" />
|
||||
<marker date="1503307972000" expanded="true" signature="1934:2298" ph="do ... end" />
|
||||
<marker date="1503307972000" expanded="true" signature="2364:7066" ph="do ... end" />
|
||||
<marker date="1503307972000" expanded="true" signature="2524:2690" ph="do ... end" />
|
||||
<marker date="1503307972000" expanded="true" signature="2527:2636" ph="do ... end" />
|
||||
<marker date="1503307972000" expanded="true" signature="3418:3480" ph="##..." />
|
||||
<marker date="1503307972000" expanded="true" signature="4350:4500" ph="##..." />
|
||||
<marker date="1503307972000" expanded="true" signature="4554:4831" ph="##..." />
|
||||
<marker date="1503307972000" expanded="true" signature="6646:6710" ph="##..." />
|
||||
<marker date="1503307972000" expanded="true" signature="7138:7187" ph="do ... end" />
|
||||
<marker date="1503307972000" expanded="true" signature="7147:7181" ph="do ... end" />
|
||||
<marker date="1503307972000" expanded="true" signature="7266:7798" ph="do ... end" />
|
||||
<marker date="1503307972000" expanded="true" signature="7864:8356" ph="do ... end" />
|
||||
<marker date="1503307972000" expanded="true" signature="8334:8350" ph="do ... end" />
|
||||
<marker date="1503307972000" expanded="true" signature="8423:9890" ph="do ... end" />
|
||||
<marker date="1503307972000" expanded="true" signature="8497:8601" ph="do ... end" />
|
||||
<marker date="1503307972000" expanded="true" signature="8730:8855" ph="do ... end" />
|
||||
<marker date="1503307972000" expanded="true" signature="8739:8780" ph="do ... end" />
|
||||
<marker date="1503307972000" expanded="true" signature="8890:8937" ph="do ... end" />
|
||||
<marker date="1503307972000" expanded="true" signature="8968:9015" ph="do ... end" />
|
||||
<marker date="1503307972000" expanded="true" signature="9314:9360" ph="##..." />
|
||||
<marker date="1503307972000" expanded="true" signature="9397:9467" ph="do ... end" />
|
||||
<marker date="1503307972000" expanded="true" signature="9663:9841" ph="do ... end" />
|
||||
<marker date="1503307972000" expanded="true" signature="9704:9750" ph="do ... end" />
|
||||
<marker date="1503307972000" expanded="true" signature="9787:9833" ph="do ... end" />
|
||||
<marker date="1503307972000" expanded="true" signature="9967:10338" ph="do ... end" />
|
||||
<marker date="1503307972000" expanded="true" signature="10416:10810" ph="do ... end" />
|
||||
<marker date="1503307972000" expanded="true" signature="10814:11124" ph="##..." />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/app/controllers/commissioners_controller.rb">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="54">
|
||||
<caret line="48" column="88" lean-forward="false" selection-start-line="48" selection-start-column="88" selection-end-line="48" selection-end-column="88" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/db/migrate/20170403155230_create_employees.rb">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="270">
|
||||
<caret line="15" column="0" lean-forward="false" selection-start-line="15" selection-start-column="0" selection-end-line="15" selection-end-column="0" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/db/migrate/20170818090115_create_commissioners.rb">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="126">
|
||||
<caret line="83" column="43" lean-forward="false" selection-start-line="83" selection-start-column="43" selection-end-line="83" selection-end-column="43" />
|
||||
<caret line="7" column="26" lean-forward="true" selection-start-line="3" selection-start-column="6" selection-end-line="7" selection-end-column="26" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/db/migrate/20170821093252_create_commissions.rb">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="72">
|
||||
<caret line="4" column="23" lean-forward="true" selection-start-line="4" selection-start-column="23" selection-end-line="4" selection-end-column="23" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
|
||||
3
app/assets/javascripts/commissions.coffee
Normal file
3
app/assets/javascripts/commissions.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/commissions.scss
Normal file
3
app/assets/stylesheets/commissions.scss
Normal file
@@ -0,0 +1,3 @@
|
||||
// Place all the styles related to the Commissions controller here.
|
||||
// They will automatically be included in application.css.
|
||||
// You can use Sass (SCSS) here: http://sass-lang.com/
|
||||
74
app/controllers/commissions_controller.rb
Normal file
74
app/controllers/commissions_controller.rb
Normal file
@@ -0,0 +1,74 @@
|
||||
class CommissionsController < ApplicationController
|
||||
before_action :set_commission, only: [:show, :edit, :update, :destroy]
|
||||
|
||||
# GET /commissions
|
||||
# GET /commissions.json
|
||||
def index
|
||||
@commissions = Commission.all
|
||||
end
|
||||
|
||||
# GET /commissions/1
|
||||
# GET /commissions/1.json
|
||||
def show
|
||||
end
|
||||
|
||||
# GET /commissions/new
|
||||
def new
|
||||
@commission = Commission.new
|
||||
end
|
||||
|
||||
# GET /commissions/1/edit
|
||||
def edit
|
||||
end
|
||||
|
||||
# POST /commissions
|
||||
# POST /commissions.json
|
||||
def create
|
||||
@commission = Commission.new(commission_params)
|
||||
|
||||
respond_to do |format|
|
||||
if @commission.save
|
||||
format.html { redirect_to @commission, notice: 'Commission was successfully created.' }
|
||||
format.json { render :show, status: :created, location: @commission }
|
||||
else
|
||||
format.html { render :new }
|
||||
format.json { render json: @commission.errors, status: :unprocessable_entity }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
# PATCH/PUT /commissions/1
|
||||
# PATCH/PUT /commissions/1.json
|
||||
def update
|
||||
respond_to do |format|
|
||||
if @commission.update(commission_params)
|
||||
format.html { redirect_to @commission, notice: 'Commission was successfully updated.' }
|
||||
format.json { render :show, status: :ok, location: @commission }
|
||||
else
|
||||
format.html { render :edit }
|
||||
format.json { render json: @commission.errors, status: :unprocessable_entity }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
# DELETE /commissions/1
|
||||
# DELETE /commissions/1.json
|
||||
def destroy
|
||||
@commission.destroy
|
||||
respond_to do |format|
|
||||
format.html { redirect_to commissions_url, notice: 'Commission was successfully destroyed.' }
|
||||
format.json { head :no_content }
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
# Use callbacks to share common setup or constraints between actions.
|
||||
def set_commission
|
||||
@commission = Commission.find(params[:id])
|
||||
end
|
||||
|
||||
# Never trust parameters from the scary internet, only allow the white list through.
|
||||
def commission_params
|
||||
params.fetch(:commission, {})
|
||||
end
|
||||
end
|
||||
2
app/helpers/commissions_helper.rb
Normal file
2
app/helpers/commissions_helper.rb
Normal file
@@ -0,0 +1,2 @@
|
||||
module CommissionsHelper
|
||||
end
|
||||
2
app/models/commission.rb
Normal file
2
app/models/commission.rb
Normal file
@@ -0,0 +1,2 @@
|
||||
class Commission < ApplicationRecord
|
||||
end
|
||||
2
app/views/commissions/_commission.json.jbuilder
Normal file
2
app/views/commissions/_commission.json.jbuilder
Normal file
@@ -0,0 +1,2 @@
|
||||
json.extract! commission, :id, :created_at, :updated_at
|
||||
json.url commission_url(commission, format: :json)
|
||||
10
app/views/commissions/_form.html.erb
Normal file
10
app/views/commissions/_form.html.erb
Normal file
@@ -0,0 +1,10 @@
|
||||
<%= simple_form_for(@commission) do |f| %>
|
||||
<%= f.error_notification %>
|
||||
|
||||
<div class="form-inputs">
|
||||
</div>
|
||||
|
||||
<div class="form-actions">
|
||||
<%= f.button :submit %>
|
||||
</div>
|
||||
<% end %>
|
||||
6
app/views/commissions/edit.html.erb
Normal file
6
app/views/commissions/edit.html.erb
Normal file
@@ -0,0 +1,6 @@
|
||||
<h1>Editing Commission</h1>
|
||||
|
||||
<%= render 'form', commission: @commission %>
|
||||
|
||||
<%= link_to 'Show', @commission %> |
|
||||
<%= link_to 'Back', commissions_path %>
|
||||
25
app/views/commissions/index.html.erb
Normal file
25
app/views/commissions/index.html.erb
Normal file
@@ -0,0 +1,25 @@
|
||||
<p id="notice"><%= notice %></p>
|
||||
|
||||
<h1>Commissions</h1>
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="3"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<% @commissions.each do |commission| %>
|
||||
<tr>
|
||||
<td><%= link_to 'Show', commission %></td>
|
||||
<td><%= link_to 'Edit', edit_commission_path(commission) %></td>
|
||||
<td><%= link_to 'Destroy', commission, method: :delete, data: { confirm: 'Are you sure?' } %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
|
||||
<%= link_to 'New Commission', new_commission_path %>
|
||||
1
app/views/commissions/index.json.jbuilder
Normal file
1
app/views/commissions/index.json.jbuilder
Normal file
@@ -0,0 +1 @@
|
||||
json.array! @commissions, partial: 'commissions/commission', as: :commission
|
||||
5
app/views/commissions/new.html.erb
Normal file
5
app/views/commissions/new.html.erb
Normal file
@@ -0,0 +1,5 @@
|
||||
<h1>New Commission</h1>
|
||||
|
||||
<%= render 'form', commission: @commission %>
|
||||
|
||||
<%= link_to 'Back', commissions_path %>
|
||||
4
app/views/commissions/show.html.erb
Normal file
4
app/views/commissions/show.html.erb
Normal file
@@ -0,0 +1,4 @@
|
||||
<p id="notice"><%= notice %></p>
|
||||
|
||||
<%= link_to 'Edit', edit_commission_path(@commission) %> |
|
||||
<%= link_to 'Back', commissions_path %>
|
||||
1
app/views/commissions/show.json.jbuilder
Normal file
1
app/views/commissions/show.json.jbuilder
Normal file
@@ -0,0 +1 @@
|
||||
json.partial! "commissions/commission", commission: @commission
|
||||
@@ -2,7 +2,12 @@ require 'sidekiq/web'
|
||||
|
||||
Rails.application.routes.draw do
|
||||
|
||||
<<<<<<< HEAD
|
||||
|
||||
=======
|
||||
resources :commissions
|
||||
resources :commissioners
|
||||
>>>>>>> 618f5f3b7c13500a65f89db46309e2a28daf5c8f
|
||||
root 'home#index'
|
||||
mount Sidekiq::Web => '/kiq'
|
||||
|
||||
|
||||
11
db/migrate/20170821093252_create_commissions.rb
Normal file
11
db/migrate/20170821093252_create_commissions.rb
Normal file
@@ -0,0 +1,11 @@
|
||||
class CreateCommissions < ActiveRecord::Migration[5.1]
|
||||
def change
|
||||
create_table :commissions do |t|
|
||||
t.integer :product_id, null: false
|
||||
t.integer :amount
|
||||
t.string :commission_type
|
||||
t.boolean :is_active
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
141
spec/controllers/commissions_controller_spec.rb
Normal file
141
spec/controllers/commissions_controller_spec.rb
Normal file
@@ -0,0 +1,141 @@
|
||||
require 'rails_helper'
|
||||
|
||||
# This spec was generated by rspec-rails when you ran the scaffold generator.
|
||||
# It demonstrates how one might use RSpec to specify the controller code that
|
||||
# was generated by Rails when you ran the scaffold generator.
|
||||
#
|
||||
# It assumes that the implementation code is generated by the rails scaffold
|
||||
# generator. If you are using any extension libraries to generate different
|
||||
# controller code, this generated spec may or may not pass.
|
||||
#
|
||||
# It only uses APIs available in rails and/or rspec-rails. There are a number
|
||||
# of tools you can use to make these specs even more expressive, but we're
|
||||
# sticking to rails and rspec-rails APIs to keep things simple and stable.
|
||||
#
|
||||
# Compared to earlier versions of this generator, there is very limited use of
|
||||
# stubs and message expectations in this spec. Stubs are only used when there
|
||||
# is no simpler way to get a handle on the object needed for the example.
|
||||
# Message expectations are only used when there is no simpler way to specify
|
||||
# that an instance is receiving a specific message.
|
||||
#
|
||||
# Also compared to earlier versions of this generator, there are no longer any
|
||||
# expectations of assigns and templates rendered. These features have been
|
||||
# removed from Rails core in Rails 5, but can be added back in via the
|
||||
# `rails-controller-testing` gem.
|
||||
|
||||
RSpec.describe CommissionsController, type: :controller do
|
||||
|
||||
# This should return the minimal set of attributes required to create a valid
|
||||
# Commission. As you add validations to Commission, be sure to
|
||||
# adjust the attributes here as well.
|
||||
let(:valid_attributes) {
|
||||
skip("Add a hash of attributes valid for your model")
|
||||
}
|
||||
|
||||
let(:invalid_attributes) {
|
||||
skip("Add a hash of attributes invalid for your model")
|
||||
}
|
||||
|
||||
# This should return the minimal set of values that should be in the session
|
||||
# in order to pass any filters (e.g. authentication) defined in
|
||||
# CommissionsController. Be sure to keep this updated too.
|
||||
let(:valid_session) { {} }
|
||||
|
||||
describe "GET #index" do
|
||||
it "returns a success response" do
|
||||
commission = Commission.create! valid_attributes
|
||||
get :index, params: {}, session: valid_session
|
||||
expect(response).to be_success
|
||||
end
|
||||
end
|
||||
|
||||
describe "GET #show" do
|
||||
it "returns a success response" do
|
||||
commission = Commission.create! valid_attributes
|
||||
get :show, params: {id: commission.to_param}, session: valid_session
|
||||
expect(response).to be_success
|
||||
end
|
||||
end
|
||||
|
||||
describe "GET #new" do
|
||||
it "returns a success response" do
|
||||
get :new, params: {}, session: valid_session
|
||||
expect(response).to be_success
|
||||
end
|
||||
end
|
||||
|
||||
describe "GET #edit" do
|
||||
it "returns a success response" do
|
||||
commission = Commission.create! valid_attributes
|
||||
get :edit, params: {id: commission.to_param}, session: valid_session
|
||||
expect(response).to be_success
|
||||
end
|
||||
end
|
||||
|
||||
describe "POST #create" do
|
||||
context "with valid params" do
|
||||
it "creates a new Commission" do
|
||||
expect {
|
||||
post :create, params: {commission: valid_attributes}, session: valid_session
|
||||
}.to change(Commission, :count).by(1)
|
||||
end
|
||||
|
||||
it "redirects to the created commission" do
|
||||
post :create, params: {commission: valid_attributes}, session: valid_session
|
||||
expect(response).to redirect_to(Commission.last)
|
||||
end
|
||||
end
|
||||
|
||||
context "with invalid params" do
|
||||
it "returns a success response (i.e. to display the 'new' template)" do
|
||||
post :create, params: {commission: invalid_attributes}, session: valid_session
|
||||
expect(response).to be_success
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
describe "PUT #update" do
|
||||
context "with valid params" do
|
||||
let(:new_attributes) {
|
||||
skip("Add a hash of attributes valid for your model")
|
||||
}
|
||||
|
||||
it "updates the requested commission" do
|
||||
commission = Commission.create! valid_attributes
|
||||
put :update, params: {id: commission.to_param, commission: new_attributes}, session: valid_session
|
||||
commission.reload
|
||||
skip("Add assertions for updated state")
|
||||
end
|
||||
|
||||
it "redirects to the commission" do
|
||||
commission = Commission.create! valid_attributes
|
||||
put :update, params: {id: commission.to_param, commission: valid_attributes}, session: valid_session
|
||||
expect(response).to redirect_to(commission)
|
||||
end
|
||||
end
|
||||
|
||||
context "with invalid params" do
|
||||
it "returns a success response (i.e. to display the 'edit' template)" do
|
||||
commission = Commission.create! valid_attributes
|
||||
put :update, params: {id: commission.to_param, commission: invalid_attributes}, session: valid_session
|
||||
expect(response).to be_success
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
describe "DELETE #destroy" do
|
||||
it "destroys the requested commission" do
|
||||
commission = Commission.create! valid_attributes
|
||||
expect {
|
||||
delete :destroy, params: {id: commission.to_param}, session: valid_session
|
||||
}.to change(Commission, :count).by(-1)
|
||||
end
|
||||
|
||||
it "redirects to the commissions list" do
|
||||
commission = Commission.create! valid_attributes
|
||||
delete :destroy, params: {id: commission.to_param}, session: valid_session
|
||||
expect(response).to redirect_to(commissions_url)
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
15
spec/helpers/commissions_helper_spec.rb
Normal file
15
spec/helpers/commissions_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 CommissionsHelper. For example:
|
||||
#
|
||||
# describe CommissionsHelper 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 CommissionsHelper, type: :helper do
|
||||
pending "add some examples to (or delete) #{__FILE__}"
|
||||
end
|
||||
5
spec/models/commission_spec.rb
Normal file
5
spec/models/commission_spec.rb
Normal file
@@ -0,0 +1,5 @@
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe Commission, type: :model do
|
||||
pending "add some examples to (or delete) #{__FILE__}"
|
||||
end
|
||||
10
spec/requests/commissions_spec.rb
Normal file
10
spec/requests/commissions_spec.rb
Normal file
@@ -0,0 +1,10 @@
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe "Commissions", type: :request do
|
||||
describe "GET /commissions" do
|
||||
it "works! (now write some real specs)" do
|
||||
get commissions_path
|
||||
expect(response).to have_http_status(200)
|
||||
end
|
||||
end
|
||||
end
|
||||
39
spec/routing/commissions_routing_spec.rb
Normal file
39
spec/routing/commissions_routing_spec.rb
Normal file
@@ -0,0 +1,39 @@
|
||||
require "rails_helper"
|
||||
|
||||
RSpec.describe CommissionsController, type: :routing do
|
||||
describe "routing" do
|
||||
|
||||
it "routes to #index" do
|
||||
expect(:get => "/commissions").to route_to("commissions#index")
|
||||
end
|
||||
|
||||
it "routes to #new" do
|
||||
expect(:get => "/commissions/new").to route_to("commissions#new")
|
||||
end
|
||||
|
||||
it "routes to #show" do
|
||||
expect(:get => "/commissions/1").to route_to("commissions#show", :id => "1")
|
||||
end
|
||||
|
||||
it "routes to #edit" do
|
||||
expect(:get => "/commissions/1/edit").to route_to("commissions#edit", :id => "1")
|
||||
end
|
||||
|
||||
it "routes to #create" do
|
||||
expect(:post => "/commissions").to route_to("commissions#create")
|
||||
end
|
||||
|
||||
it "routes to #update via PUT" do
|
||||
expect(:put => "/commissions/1").to route_to("commissions#update", :id => "1")
|
||||
end
|
||||
|
||||
it "routes to #update via PATCH" do
|
||||
expect(:patch => "/commissions/1").to route_to("commissions#update", :id => "1")
|
||||
end
|
||||
|
||||
it "routes to #destroy" do
|
||||
expect(:delete => "/commissions/1").to route_to("commissions#destroy", :id => "1")
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
14
spec/views/commissions/edit.html.erb_spec.rb
Normal file
14
spec/views/commissions/edit.html.erb_spec.rb
Normal file
@@ -0,0 +1,14 @@
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe "commissions/edit", type: :view do
|
||||
before(:each) do
|
||||
@commission = assign(:commission, Commission.create!())
|
||||
end
|
||||
|
||||
it "renders the edit commission form" do
|
||||
render
|
||||
|
||||
assert_select "form[action=?][method=?]", commission_path(@commission), "post" do
|
||||
end
|
||||
end
|
||||
end
|
||||
14
spec/views/commissions/index.html.erb_spec.rb
Normal file
14
spec/views/commissions/index.html.erb_spec.rb
Normal file
@@ -0,0 +1,14 @@
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe "commissions/index", type: :view do
|
||||
before(:each) do
|
||||
assign(:commissions, [
|
||||
Commission.create!(),
|
||||
Commission.create!()
|
||||
])
|
||||
end
|
||||
|
||||
it "renders a list of commissions" do
|
||||
render
|
||||
end
|
||||
end
|
||||
14
spec/views/commissions/new.html.erb_spec.rb
Normal file
14
spec/views/commissions/new.html.erb_spec.rb
Normal file
@@ -0,0 +1,14 @@
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe "commissions/new", type: :view do
|
||||
before(:each) do
|
||||
assign(:commission, Commission.new())
|
||||
end
|
||||
|
||||
it "renders new commission form" do
|
||||
render
|
||||
|
||||
assert_select "form[action=?][method=?]", commissions_path, "post" do
|
||||
end
|
||||
end
|
||||
end
|
||||
11
spec/views/commissions/show.html.erb_spec.rb
Normal file
11
spec/views/commissions/show.html.erb_spec.rb
Normal file
@@ -0,0 +1,11 @@
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe "commissions/show", type: :view do
|
||||
before(:each) do
|
||||
@commission = assign(:commission, Commission.create!())
|
||||
end
|
||||
|
||||
it "renders attributes in <p>" do
|
||||
render
|
||||
end
|
||||
end
|
||||
9
test/system/commissions_test.rb
Normal file
9
test/system/commissions_test.rb
Normal file
@@ -0,0 +1,9 @@
|
||||
require "application_system_test_case"
|
||||
|
||||
class CommissionsTest < ApplicationSystemTestCase
|
||||
# test "visiting the index" do
|
||||
# visit commissions_url
|
||||
#
|
||||
# assert_selector "h1", text: "Commission"
|
||||
# end
|
||||
end
|
||||
Reference in New Issue
Block a user