refactoringui 例子还不错 正在读 还是有点启发的
去取取经
可惜了小城市 ruby 岗位还是太少,跳槽都只能往外跳
半夜品味了一番
公司太安静了,觉得有些压抑
那我心安理得的写中文了
谢谢帮助!
点开这个按钮 就不行
<button class="btn btn btn-primary btn-xs" title="新增" type="button" onclick="window.location='/hr/worker_fields/new';"><i class="fa fa-plus"></i> 新增</button>
正常写 link 就可以
<a href="/hr/worker_fields/new">new</a>
还挺神奇
谢谢
<form class="navbar-left" id="new_hr_worker_field" max_columns="2" action="/hr/worker_fields" accept-charset="UTF-8" data-remote="true" method="post"><input name="utf8" type="hidden" value="✓"><input type="hidden" name="authenticity_token" value="fTZiZhfkuxYwMC7+vUeOM0dcEuPslmTLHbJD5k/mJJn/2pTWa4gpClxEATxQsX/hh+Xh+lbfqvuuSEKoDxfrfg==">
<input id="tag_name" class="form-control" placeholder="标签名" type="text" name="hr_worker_field[field_name]">
<input type="submit" name="commit" value="创建" class="btn btn-primary " data-disable-with="创建">
</form>
请问是这个? application.js
//= require jquery2
//= require jquery_ujs
//= require jquery-ui
谢谢帮忙;但是不太行报了新错
Processing by Hr::WorkerFieldsController#create as HTML
Parameters: {"utf8"=>"✓", "authenticity_token"=>"fTZiZhfkuxYwMC7+vUeOM0dcEuPslmTLHbJD5k/mJJn/2pTWa4gpClxEATxQsX/hh+Xh+lbfqvuuSEKoDxfrfg==", "hr_worker_field"=>{"field_name"=>"xxx"}}
Fdn::User Load (0.6ms) SELECT `fdn_users`.* FROM `fdn_users` WHERE `fdn_users`.`id` = 1 LIMIT 1
↳ app/helpers/fdn/user_sessions_helper.rb:22
Fdn::UserInformation Load (0.8ms) SELECT `fdn_user_informations`.* FROM `fdn_user_informations` WHERE `fdn_user_informations`.`user_id` = 1
↳ app/helpers/fdn/user_sessions_helper.rb:22
(0.2ms) BEGIN
↳ app/controllers/hr/worker_fields_controller.rb:17
Hr::WorkerField Create (0.4ms) INSERT INTO `hr_worker_fields` (`field_name`, `created_at`, `updated_at`) VALUES ('xxx', '2020-07-13 19:28:25', '2020-07-13 19:28:25')
↳ app/controllers/hr/worker_fields_controller.rb:17
(3.6ms) COMMIT
↳ app/controllers/hr/worker_fields_controller.rb:17
Completed 500 in 41ms (ActiveRecord: 5.6ms)
ActionController::UnknownFormat - Hr::WorkerFieldsController#create is missing a template for this request format and variant.
request.formats: ["text/html"]
request.variant: []:
Started POST "/__better_errors/fd9a32653680483b/variables" for ::1 at 2020-07-13 19:28:25 +0800
感谢提醒,刚重新编辑了一下
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 127.0.0.53:53 0.0.0.0:* LISTEN 309/systemd-resolve
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 837/sshd
tcp 0 0 0.0.0.0:3000 0.0.0.0:* LISTEN 12800/nginx: master
tcp 0 0 0.0.0.0:34893 0.0.0.0:* LISTEN 19509/Passenger App
意思就是用在了 3000 端口上?
Unit nginx.service could not be found.那看来是没成功;谢谢
明白了!
是 想问表单怎么写