建议先想办法在当前团队转正,转正后再想办法活水到你认为有技术深度的团队或者积累了一定经验后跳槽到其他公司。服务端的看自己时间,转正优先,有余力的话再考虑。另外建议也再学学 vue
@lyfi2003 文章已购买,貌似代码没有高亮显示?
是不是 aws 安全组没有设置?导致不可访问?
我报了 libfreetype.6.dylib 相关的错误。
解决方案如下:
brew uninstall --force freetype && brew install freetype
之后又报了 libpng 的错误
和上面的方法一样
brew uninstall --force libpng && brew install libpng
class CompaniesController < ApplicationController
def index
@companies = Company.paginate(page: params[:page], per_page: 6)
# render json:@companies
respond_to do |format|
format.html
format.json {render json: {company: @companies}}
end
# render json: {company: @companies}
end
def new
@company = Company.new
end
def show
@company = Company.find(params[:id])
# current_company = @company
# @company_job = @company.company_jobs.build
@company_jobs = @company.company_jobs.paginate(page: params[:page])
end
def create
@company = Company.new(company_params)
@company.avatar = params[:file]
@company.avatar = [File.open("public/uploads/")]
if @company.save
redirect_to @company
else
render 'new'
end
end
def update
end
private
def company_params
params.require(:company).permit(:name, :describe, :contact,
:product, :location, :field,
:homepage, :funder,
:address)
end
end
#1 楼 @libuchao 谢谢,这个问题解决了,但是又出现了一个新的问题。。。求解
我在 job controller 中定义了
def create
@company = Company.find(params[:company_id])
@job = @company.jobs.build(job_params)
if @job.save
flash[:success] = "job has created!"
redirect_to @job #这行报错
else
redirect_to @company
end
end
错误为:
NoMethodError in JobsController#create
undefined method `job_url' for #<JobsController:0x00000105baf968>
这个怎么解决?
#1 楼 @night_7th 那 :res_1, only: [] 的意思是对 res_1 不生成任何路由?