操作控制器:在rails中捕获异常

时间:2015-08-07 16:38:03

标签: ruby-on-rails

我在仪表板底部设置此链接时遇到问题。

<%= link_to "Contracts", space_contract_path(@space, @contract), class: "btn btn-primary" %>  

这是我的路线

space_contract GET /spaces/:space_id/contracts/:id(.:format) contracts#show

这是我的控制器代码段

def dashboard
    @spaces = Space.where(prime_tenant_id: current_user.id)
    @properties = Property.where(landlord_id: current_user.id)
    @conversations = current_user.mailbox.inbox.page(params[:page]).per_page(25)
    @contracts = current_user.contracts
  end

1 个答案:

答案 0 :(得分:0)

试试这个

T**

或者

reinterpret_cast

AutoFilterintYearStart = 1995 intYearEnd = 2000 intLastRow = Range("A1").End(xlDown).Row With Range("A1:A" & intLastRow) .AutoFilter Field:=1, Criteria1:=">=1/1/" & intYearStart, Operator:=xlAnd, Criteria2:="<=12/31/" & intYearEnd .SpecialCells(xlCellTypeVisible).Select .AutoFilter End With 应该是资源的实例,例如在你的控制器

<%= link_to "Contracts", space_contract_path(@space,  @contract), class: "btn btn-primary" %>