rails_ship 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE +20 -0
- data/README.md +32 -0
- data/Rakefile +32 -0
- data/app/controllers/ship/admin/addresses_controller.rb +48 -0
- data/app/controllers/ship/admin/base_controller.rb +5 -0
- data/app/controllers/ship/admin/home_controller.rb +8 -0
- data/app/controllers/ship/admin/packages_controller.rb +43 -0
- data/app/controllers/ship/admin/trade_items_controller.rb +72 -0
- data/app/controllers/ship/driver/base_controller.rb +9 -0
- data/app/controllers/ship/driver/favorites_controller.rb +39 -0
- data/app/controllers/ship/my/addresses_controller.rb +58 -0
- data/app/controllers/ship/my/base_controller.rb +5 -0
- data/app/controllers/ship/my/cars_controller.rb +54 -0
- data/app/controllers/ship/my/drivers_controller.rb +38 -0
- data/app/controllers/ship/my/favorites_controller.rb +40 -0
- data/app/controllers/ship/my/lines_controller.rb +71 -0
- data/app/controllers/ship/my/locations_controller.rb +60 -0
- data/app/controllers/ship/my/packages_controller.rb +53 -0
- data/app/controllers/ship/my/principal_addresses_controller.rb +26 -0
- data/app/controllers/ship/panel/base_controller.rb +5 -0
- data/app/controllers/ship/panel/lines_controller.rb +53 -0
- data/app/controllers/ship/panel/similars_controller.rb +61 -0
- data/app/jobs/ship/car_ocr_job.rb +11 -0
- data/app/jobs/ship/driver_ocr_job.rb +11 -0
- data/app/jobs/ship/location_geo_job.rb +10 -0
- data/app/models/ship/address.rb +7 -0
- data/app/models/ship/car.rb +5 -0
- data/app/models/ship/driver.rb +5 -0
- data/app/models/ship/ext/order.rb +7 -0
- data/app/models/ship/ext/trade_item.rb +11 -0
- data/app/models/ship/ext/user.rb +15 -0
- data/app/models/ship/favorite.rb +5 -0
- data/app/models/ship/line.rb +5 -0
- data/app/models/ship/line_similar.rb +5 -0
- data/app/models/ship/location.rb +5 -0
- data/app/models/ship/model/address.rb +10 -0
- data/app/models/ship/model/car.rb +34 -0
- data/app/models/ship/model/driver.rb +45 -0
- data/app/models/ship/model/favorite.rb +14 -0
- data/app/models/ship/model/line.rb +28 -0
- data/app/models/ship/model/line_similar.rb +16 -0
- data/app/models/ship/model/location.rb +53 -0
- data/app/models/ship/model/package.rb +28 -0
- data/app/models/ship/model/packaged.rb +29 -0
- data/app/models/ship/model/shipment.rb +22 -0
- data/app/models/ship/model/shipping.rb +9 -0
- data/app/models/ship/package.rb +6 -0
- data/app/models/ship/packaged.rb +5 -0
- data/app/models/ship/shipment.rb +5 -0
- data/app/models/ship.rb +11 -0
- data/app/views/admin/_ship_nav.html.erb +11 -0
- data/app/views/panel/_ship_nav.html.erb +10 -0
- data/app/views/ship/admin/addresses/_address.html.erb +24 -0
- data/app/views/ship/admin/addresses/_edit_form.html.erb +3 -0
- data/app/views/ship/admin/addresses/_form.html.erb +9 -0
- data/app/views/ship/admin/addresses/index.html.erb +36 -0
- data/app/views/ship/admin/base/_nav.html.erb +3 -0
- data/app/views/ship/admin/home/index.html.erb +0 -0
- data/app/views/ship/admin/packages/_button.html.erb +0 -0
- data/app/views/ship/admin/packages/_edit_form.html.erb +4 -0
- data/app/views/ship/admin/packages/_filter_form.html.erb +9 -0
- data/app/views/ship/admin/packages/_form.html.erb +5 -0
- data/app/views/ship/admin/packages/_index_tbody.html.erb +8 -0
- data/app/views/ship/admin/packages/_index_thead.html.erb +5 -0
- data/app/views/ship/admin/packages/_new_form.html.erb +4 -0
- data/app/views/ship/admin/packages/_show_table.html.erb +16 -0
- data/app/views/ship/admin/packages/index.html.erb +5 -0
- data/app/views/ship/admin/rallies/_filter.html.erb +7 -0
- data/app/views/ship/admin/rallies/_form.html+phone.erb +17 -0
- data/app/views/ship/admin/rallies/_show_table.html+phone.erb +24 -0
- data/app/views/ship/admin/rallies/_show_table.html.erb +12 -0
- data/app/views/ship/admin/rallies/index.html+phone.erb +26 -0
- data/app/views/ship/admin/rallies/show.html.erb +26 -0
- data/app/views/ship/admin/trade_items/_filter.html.erb +9 -0
- data/app/views/ship/admin/trade_items/_form.html.erb +7 -0
- data/app/views/ship/admin/trade_items/_show_table.html.erb +24 -0
- data/app/views/ship/admin/trade_items/index.html.erb +51 -0
- data/app/views/ship/driver/favorites/_button.html+phone.erb +4 -0
- data/app/views/ship/driver/favorites/_edit_form.html.erb +4 -0
- data/app/views/ship/driver/favorites/_filter_form.html+phone.erb +14 -0
- data/app/views/ship/driver/favorites/_filter_form.html.erb +9 -0
- data/app/views/ship/driver/favorites/_form.html.erb +3 -0
- data/app/views/ship/driver/favorites/_index_tbody.html.erb +6 -0
- data/app/views/ship/driver/favorites/_index_thead.html.erb +3 -0
- data/app/views/ship/driver/favorites/_index_tr.html.erb +4 -0
- data/app/views/ship/driver/favorites/_new_form.html.erb +4 -0
- data/app/views/ship/driver/favorites/_show_table.html.erb +8 -0
- data/app/views/ship/driver/favorites/index.html.erb +5 -0
- data/app/views/ship/my/addresses/_edit_form.html.erb +21 -0
- data/app/views/ship/my/addresses/_form.html.erb +23 -0
- data/app/views/ship/my/addresses/index.html.erb +44 -0
- data/app/views/ship/my/cars/_edit_form.html.erb +6 -0
- data/app/views/ship/my/cars/_filter_form.html.erb +9 -0
- data/app/views/ship/my/cars/_index_tbody.html.erb +3 -0
- data/app/views/ship/my/cars/_index_thead.html.erb +4 -0
- data/app/views/ship/my/cars/_new_form.html.erb +4 -0
- data/app/views/ship/my/cars/_show_table.html.erb +16 -0
- data/app/views/ship/my/cars/create.turbo_stream.erb +1 -0
- data/app/views/ship/my/cars/index.html+phone.erb +19 -0
- data/app/views/ship/my/cars/index.html.erb +5 -0
- data/app/views/ship/my/cars/new.html.erb +25 -0
- data/app/views/ship/my/drivers/_edit_form.html.erb +6 -0
- data/app/views/ship/my/drivers/_form.html.erb +4 -0
- data/app/views/ship/my/drivers/_index_tbody.html.erb +3 -0
- data/app/views/ship/my/drivers/_index_thead.html.erb +4 -0
- data/app/views/ship/my/drivers/_new_form.html.erb +4 -0
- data/app/views/ship/my/drivers/_show_table.html.erb +12 -0
- data/app/views/ship/my/drivers/_uploader.html.erb +22 -0
- data/app/views/ship/my/drivers/edit.html.erb +20 -0
- data/app/views/ship/my/drivers/show.html.erb +33 -0
- data/app/views/ship/my/favorites/_button.html+phone.erb +4 -0
- data/app/views/ship/my/favorites/_edit_form.html.erb +4 -0
- data/app/views/ship/my/favorites/_filter_form.html+phone.erb +14 -0
- data/app/views/ship/my/favorites/_filter_form.html.erb +9 -0
- data/app/views/ship/my/favorites/_form.html.erb +3 -0
- data/app/views/ship/my/favorites/_index_tbody.html.erb +6 -0
- data/app/views/ship/my/favorites/_index_thead.html.erb +3 -0
- data/app/views/ship/my/favorites/_new_form.html.erb +4 -0
- data/app/views/ship/my/favorites/_show_table.html.erb +8 -0
- data/app/views/ship/my/favorites/index.html.erb +5 -0
- data/app/views/ship/my/lines/_edit_form.html.erb +4 -0
- data/app/views/ship/my/lines/_filter_form.html.erb +1 -0
- data/app/views/ship/my/lines/_form.html.erb +3 -0
- data/app/views/ship/my/lines/_index_tbody.html.erb +6 -0
- data/app/views/ship/my/lines/_index_tr.html.erb +4 -0
- data/app/views/ship/my/lines/_item_field.html.erb +8 -0
- data/app/views/ship/my/lines/_item_location.html.erb +13 -0
- data/app/views/ship/my/lines/_new_form.html.erb +15 -0
- data/app/views/ship/my/lines/_select/_tab_bar.html.erb +10 -0
- data/app/views/ship/my/lines/_select.html.erb +10 -0
- data/app/views/ship/my/lines/_show/_index_tbody.html.erb +6 -0
- data/app/views/ship/my/lines/_show/_index_tr.html+phone.erb +6 -0
- data/app/views/ship/my/lines/_show_table.html.erb +9 -0
- data/app/views/ship/my/lines/add.turbo_stream.erb +1 -0
- data/app/views/ship/my/lines/index.html.erb +5 -0
- data/app/views/ship/my/lines/new.html.erb +1 -0
- data/app/views/ship/my/lines/requirement.html.erb +5 -0
- data/app/views/ship/my/lines/select.turbo_stream.erb +1 -0
- data/app/views/ship/my/lines/show.html+phone.erb +30 -0
- data/app/views/ship/my/locations/_edit_form.html.erb +4 -0
- data/app/views/ship/my/locations/_filter_form.html.erb +9 -0
- data/app/views/ship/my/locations/_form.html.erb +6 -0
- data/app/views/ship/my/locations/_index_tbody.html.erb +5 -0
- data/app/views/ship/my/locations/_index_thead.html.erb +6 -0
- data/app/views/ship/my/locations/_new_form.html.erb +4 -0
- data/app/views/ship/my/locations/_show_table.html.erb +20 -0
- data/app/views/ship/my/locations/index.html.erb +5 -0
- data/app/views/ship/my/packages/index.html.erb +31 -0
- data/app/views/ship/my/principal_addresses/index.html+phone.erb +32 -0
- data/app/views/ship/my/principal_addresses/plans.html+phone.erb +23 -0
- data/app/views/ship/my/principal_addresses/show.html+phone.erb +27 -0
- data/app/views/ship/panel/base/_nav.html.erb +3 -0
- data/app/views/ship/panel/lines/_edit_form.html.erb +4 -0
- data/app/views/ship/panel/lines/_filter_form.html.erb +9 -0
- data/app/views/ship/panel/lines/_form.html.erb +4 -0
- data/app/views/ship/panel/lines/_index_tbody.html.erb +4 -0
- data/app/views/ship/panel/lines/_index_thead.html.erb +5 -0
- data/app/views/ship/panel/lines/_index_tr.html.erb +19 -0
- data/app/views/ship/panel/lines/_new_form.html.erb +4 -0
- data/app/views/ship/panel/lines/_show_table.html.erb +12 -0
- data/app/views/ship/panel/lines/index.html.erb +5 -0
- data/app/views/ship/panel/similars/_breadcrumb.html.erb +7 -0
- data/app/views/ship/panel/similars/_button.html.erb +3 -0
- data/app/views/ship/panel/similars/_edit_form.html.erb +4 -0
- data/app/views/ship/panel/similars/_filter_form.html.erb +9 -0
- data/app/views/ship/panel/similars/_form.html.erb +4 -0
- data/app/views/ship/panel/similars/_index_tbody.html.erb +3 -0
- data/app/views/ship/panel/similars/_index_thead.html.erb +4 -0
- data/app/views/ship/panel/similars/_new/_button.html.erb +0 -0
- data/app/views/ship/panel/similars/_new/_index_tr.html.erb +10 -0
- data/app/views/ship/panel/similars/_new/_index_tr_remove.html.erb +10 -0
- data/app/views/ship/panel/similars/_new_form.html.erb +4 -0
- data/app/views/ship/panel/similars/_show_table.html.erb +12 -0
- data/app/views/ship/panel/similars/create.turbo_stream.erb +3 -0
- data/app/views/ship/panel/similars/destroy.turbo_stream.erb +3 -0
- data/app/views/ship/panel/similars/index.html.erb +5 -0
- data/app/views/ship/panel/similars/new.html.erb +16 -0
- data/config/locales/zh.attributes.yml +15 -0
- data/config/locales/zh.yml +51 -0
- data/config/routes.rb +66 -0
- data/lib/rails_ship/config.rb +11 -0
- data/lib/rails_ship/engine.rb +21 -0
- data/lib/rails_ship.rb +2 -0
- metadata +240 -0
@@ -0,0 +1,27 @@
|
|
1
|
+
<% @customs.each do |custom| %>
|
2
|
+
<div class="weui-form-preview">
|
3
|
+
<div class="weui-form-preview__hd">
|
4
|
+
<div class="weui-form-preview__item">
|
5
|
+
<label class="weui-form-preview__label">付款金额</label>
|
6
|
+
<em class="weui-form-preview__value">¥2400.00</em>
|
7
|
+
</div>
|
8
|
+
</div>
|
9
|
+
<div class="weui-form-preview__bd">
|
10
|
+
<div class="weui-form-preview__item">
|
11
|
+
<label class="weui-form-preview__label">商品</label>
|
12
|
+
<span class="weui-form-preview__value">电动打蛋机</span>
|
13
|
+
</div>
|
14
|
+
<div class="weui-form-preview__item">
|
15
|
+
<label class="weui-form-preview__label">标题标题</label>
|
16
|
+
<span class="weui-form-preview__value">名字名字名字</span>
|
17
|
+
</div>
|
18
|
+
<div class="weui-form-preview__item">
|
19
|
+
<label class="weui-form-preview__label">标题标题</label>
|
20
|
+
<span class="weui-form-preview__value">很长很长的名字很长很长的名字很长很长的名字很长很长的名字很长很长的名字</span>
|
21
|
+
</div>
|
22
|
+
</div>
|
23
|
+
<div class="weui-form-preview__ft">
|
24
|
+
<%= link_to '操作', my_principal_address_trade_items_path(@address, good_id: custom.id), class: 'weui-form-preview__btn weui-form-preview__btn_primary' %>
|
25
|
+
</div>
|
26
|
+
</div>
|
27
|
+
<% end %>
|
@@ -0,0 +1,9 @@
|
|
1
|
+
<%= form_with theme: 'search', model: Ship::Line.new do |f| %>
|
2
|
+
<div class="field-body">
|
3
|
+
<%= f.text_field :name %>
|
4
|
+
<div class="field is-narrow">
|
5
|
+
<%= f.submit %>
|
6
|
+
<%= link_to t('.clear'), filter_params(except: [:name]), class: 'button is-light' %>
|
7
|
+
</div>
|
8
|
+
</div>
|
9
|
+
<% end %>
|
@@ -0,0 +1,19 @@
|
|
1
|
+
<tr id="tr_<%= model.id %>" data-controller="show" data-action="mouseenter->show#show mouseleave->show#hide">
|
2
|
+
<%= yield %>
|
3
|
+
<td>
|
4
|
+
<span data-show-target="item" style="visibility: hidden">
|
5
|
+
<%= link_to({ controller: 'similars', line_id: model.id }, aria: { label: t('ship.panel.similars.index.title') }, class: 'button is-small is-rounded is-light') do %>
|
6
|
+
<i class="fas fa-map-signs"></i>
|
7
|
+
<% end %>
|
8
|
+
<%= link_to({ action: 'show', id: model.id }, data: { turbo_frame: 'modal' }, aria: { label: t('.show') }, class: 'button is-small is-rounded is-light') do %>
|
9
|
+
<i class="fas fa-info"></i>
|
10
|
+
<% end %>
|
11
|
+
<%= link_to({ action: 'edit', id: model.id }, data: { turbo_frame: 'modal' }, aria: { label: t('.edit') }, class: 'button is-small is-rounded is-light') do %>
|
12
|
+
<i class="fas fa-pencil-alt"></i>
|
13
|
+
<% end %>
|
14
|
+
<%= button_to({ action: 'destroy', id: model.id }, method: :delete, data: { confirm: t('.confirm') }, aria: { label: t('.destroy') }, class: 'button is-small is-rounded is-light') do %>
|
15
|
+
<i class="fas fa-trash-alt"></i>
|
16
|
+
<% end %>
|
17
|
+
</span>
|
18
|
+
</td>
|
19
|
+
</tr>
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<tr>
|
2
|
+
<td class="has-text-right"><%= Ship::Line.human_attribute_name(:name) %></td>
|
3
|
+
<td><%= @line.name %></td>
|
4
|
+
</tr>
|
5
|
+
<tr>
|
6
|
+
<td class="has-text-right"><%= Ship::Line.human_attribute_name(:start_name) %></td>
|
7
|
+
<td><%= @line.start_name %></td>
|
8
|
+
</tr>
|
9
|
+
<tr>
|
10
|
+
<td class="has-text-right"><%= Ship::Line.human_attribute_name(:finish_name) %></td>
|
11
|
+
<td><%= @line.finish_name %></td>
|
12
|
+
</tr>
|
@@ -0,0 +1,7 @@
|
|
1
|
+
<div class="breadcrumb has-succeeds-separator">
|
2
|
+
<ul>
|
3
|
+
<li><%= link_to t('ship.panel.lines.index.title'), { controller: 'lines' } %></li>
|
4
|
+
<li><%= link_to @line.name, { controller: 'lines', id: @line.id } %></li>
|
5
|
+
<li class="is-active"><%= t('.title') %></li>
|
6
|
+
</ul>
|
7
|
+
</div>
|
@@ -0,0 +1,9 @@
|
|
1
|
+
<%= form_with theme: 'search', model: Ship::Line.new do |f| %>
|
2
|
+
<div class="field-body">
|
3
|
+
<%= f.text_field :name %>
|
4
|
+
<div class="field is-narrow">
|
5
|
+
<%= f.submit %>
|
6
|
+
<%= link_to t('.clear'), filter_params(except: [:name]), class: 'button is-light' %>
|
7
|
+
</div>
|
8
|
+
</div>
|
9
|
+
<% end %>
|
File without changes
|
@@ -0,0 +1,10 @@
|
|
1
|
+
<tr id="tr_<%= model.id %>" data-controller="show" data-action="mouseenter->show#show mouseleave->show#hide">
|
2
|
+
<%= yield %>
|
3
|
+
<td>
|
4
|
+
<span data-show-target="item" style="visibility: hidden">
|
5
|
+
<%= button_to({ action: 'create' }, params: { similar_id: model.id }, class: 'button is-small is-rounded is-light') do %>
|
6
|
+
<i class="fas fa-plus"></i>
|
7
|
+
<% end %>
|
8
|
+
</span>
|
9
|
+
</td>
|
10
|
+
</tr>
|
@@ -0,0 +1,10 @@
|
|
1
|
+
<tr id="tr_<%= model.id %>" data-controller="show" data-action="mouseenter->show#show mouseleave->show#hide">
|
2
|
+
<%= yield %>
|
3
|
+
<td>
|
4
|
+
<span data-show-target="item" style="visibility: hidden">
|
5
|
+
<%= button_to({ action: 'destroy', id: model.id }, params: { similar_id: model.id }, method: :delete, data: { confirm: t('.confirm') }, aria: { label: t('.destroy') }, class: 'button is-small is-rounded is-light') do %>
|
6
|
+
<i class="fas fa-trash-alt"></i>
|
7
|
+
<% end %>
|
8
|
+
</span>
|
9
|
+
</td>
|
10
|
+
</tr>
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<tr>
|
2
|
+
<td class="has-text-right"><%= Ship::Line.human_attribute_name(:name) %></td>
|
3
|
+
<td><%= @similar.name %></td>
|
4
|
+
</tr>
|
5
|
+
<tr>
|
6
|
+
<td class="has-text-right"><%= Ship::Line.human_attribute_name(:start_name) %></td>
|
7
|
+
<td><%= @similar.start_name %></td>
|
8
|
+
</tr>
|
9
|
+
<tr>
|
10
|
+
<td class="has-text-right"><%= Ship::Line.human_attribute_name(:finish_name) %></td>
|
11
|
+
<td><%= @similar.finish_name %></td>
|
12
|
+
</tr>
|
@@ -0,0 +1,16 @@
|
|
1
|
+
<div class="columns">
|
2
|
+
<div class="column">
|
3
|
+
<%= render layout: 'index_table', locals: { cache_key: Ship::Line.column_names.hash } do %>
|
4
|
+
<%= render partial: 'index_tbody', layout: 'index_tr_remove', collection: @similars, as: :model %>
|
5
|
+
<% end %>
|
6
|
+
|
7
|
+
<%= paginate @similars %>
|
8
|
+
</div>
|
9
|
+
<div class="column">
|
10
|
+
<%= render layout: 'index_table', locals: { cache_key: Ship::Line.column_names.hash } do %>
|
11
|
+
<%= render partial: 'index_tbody', layout: 'index_tr', collection: @lines, as: :model %>
|
12
|
+
<% end %>
|
13
|
+
|
14
|
+
<%= paginate @lines %>
|
15
|
+
</div>
|
16
|
+
</div>
|
@@ -0,0 +1,51 @@
|
|
1
|
+
zh:
|
2
|
+
ship:
|
3
|
+
panel:
|
4
|
+
title: 运输管理
|
5
|
+
lines:
|
6
|
+
index:
|
7
|
+
title: 路线
|
8
|
+
similars:
|
9
|
+
index:
|
10
|
+
title: 相似路线
|
11
|
+
admin:
|
12
|
+
title: 发货管理
|
13
|
+
addresses:
|
14
|
+
index:
|
15
|
+
title: 地址列表
|
16
|
+
trade_items:
|
17
|
+
index:
|
18
|
+
title: 商品列表
|
19
|
+
package: 打包
|
20
|
+
packages:
|
21
|
+
index:
|
22
|
+
title: 包裹列表
|
23
|
+
my:
|
24
|
+
packages:
|
25
|
+
index:
|
26
|
+
title: 包裹列表
|
27
|
+
wait: 叫号
|
28
|
+
lines:
|
29
|
+
index:
|
30
|
+
title: 找车
|
31
|
+
new: 添加路线
|
32
|
+
requirement:
|
33
|
+
title: 找人/找货
|
34
|
+
new: 添加路线
|
35
|
+
cars:
|
36
|
+
index:
|
37
|
+
title: 我的车辆
|
38
|
+
new: 添加车辆
|
39
|
+
drivers:
|
40
|
+
show:
|
41
|
+
title: 司机认证
|
42
|
+
edit:
|
43
|
+
title: 司机认证
|
44
|
+
show: 返回
|
45
|
+
favorites:
|
46
|
+
index:
|
47
|
+
title: 熟人司机
|
48
|
+
driver:
|
49
|
+
favorites:
|
50
|
+
index:
|
51
|
+
title: 熟人乘客
|
data/config/routes.rb
ADDED
@@ -0,0 +1,66 @@
|
|
1
|
+
Rails.application.routes.draw do
|
2
|
+
|
3
|
+
namespace :ship do
|
4
|
+
namespace :panel do
|
5
|
+
resources :similars
|
6
|
+
end
|
7
|
+
end
|
8
|
+
namespace :ship do
|
9
|
+
namespace :panel do
|
10
|
+
resources :lines
|
11
|
+
end
|
12
|
+
end
|
13
|
+
namespace :ship, defaults: { business: 'ship' } do
|
14
|
+
|
15
|
+
namespace :panel, defaults: { namespace: 'panel' } do
|
16
|
+
resources :lines do
|
17
|
+
resources :similars
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
namespace :admin, defaults: { namespace: 'admin' } do
|
22
|
+
resources :addresses do
|
23
|
+
resources :trade_items do
|
24
|
+
collection do
|
25
|
+
post :package
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
resources :packages, except: [:new, :create]
|
30
|
+
resources :lines do
|
31
|
+
resources :locations
|
32
|
+
end
|
33
|
+
root 'home#index'
|
34
|
+
end
|
35
|
+
|
36
|
+
namespace :driver, defaults: { namespace: 'driver' } do
|
37
|
+
resources :favorites
|
38
|
+
end
|
39
|
+
|
40
|
+
namespace :my, defaults: { namespace: 'my' } do
|
41
|
+
resource :driver
|
42
|
+
resources :favorites
|
43
|
+
resources :cars
|
44
|
+
resources :lines do
|
45
|
+
collection do
|
46
|
+
get :requirement
|
47
|
+
post :add
|
48
|
+
post :select
|
49
|
+
end
|
50
|
+
resources :locations
|
51
|
+
end
|
52
|
+
resources :principal_addresses, only: [:index, :show] do
|
53
|
+
member do
|
54
|
+
get :plans
|
55
|
+
end
|
56
|
+
resources :packages do
|
57
|
+
member do
|
58
|
+
put :wait
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
64
|
+
end
|
65
|
+
|
66
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
require 'rails_com'
|
2
|
+
|
3
|
+
module RailsShip
|
4
|
+
class Engine < ::Rails::Engine
|
5
|
+
|
6
|
+
config.generators do |g|
|
7
|
+
g.rails = {
|
8
|
+
assets: false,
|
9
|
+
stylesheets: false,
|
10
|
+
helper: false,
|
11
|
+
route: false
|
12
|
+
}
|
13
|
+
g.test_unit = {
|
14
|
+
fixture: true,
|
15
|
+
fixture_replacement: :factory_girl
|
16
|
+
}
|
17
|
+
g.templates.unshift File.expand_path('lib/templates', RailsCom::Engine.root)
|
18
|
+
end
|
19
|
+
|
20
|
+
end
|
21
|
+
end
|
data/lib/rails_ship.rb
ADDED