link-to

    4热度

    1回答

    我想弄清楚如何用Rails 4制作应用程序。我一直在基本的东西上停滞不前,而且我似乎无法确定使用未来的原则。 我有一个配置文件模型和一个行业模型。该协会是: 简介: has_and_belongs_to_many :industries, join_table: 'industries_profiles' 行业: has_and_belongs_to_many :profiles, join_

    1热度

    7回答

    我希望我的应用程序在点击链接时将图书添加到current_user。我的代码似乎没问题,没有错误,但用户点击链接后没有任何反应。 book.rb: has_many :book_users has_many :users, through: :book_users user.rb: has_many :book_users has_many :books, through: :book_u

    0热度

    1回答

    我们有一个使用navigo库创建路线的JavaScript前端应用程序。 我想使用navigo符号在电子邮件中创建一个链接。问题是,如果我创建link_to的链接,只透过路径NAVIGO,像这样: link_to 'Some link', '/#/some/custom/path' 会,因为它应该,只是在链接href属性把/#/some/custom/path。 根据Rails的指南,如果我设

    1热度

    2回答

    我在一个名为LearnPython的Rails应用程序上做了一个红宝石。我有一个link_to,其中1个没有出现。我会放几个文件,以便你能帮助我。对不起,如果这是一个非常简单的错误,可以在2秒内解决。 app/views/learn/hub.html.erb <h1>Time to LearnPython!!!</h1> <%= link_to "Lesson 1: Variables", le

    0热度

    2回答

    我该如何解决这个问题? 我有2个按钮: /views/subjects/_inscription_button.html.haml - if subject.participation(current_participant).nil? = link_to "Ca m'intéresse !", subject_participant_index_path(:interested_id

    1热度

    1回答

    我有用户模型,有很多细节。 在详细列表(索引)页面(./details)中有一个link_to备份主表或拥有详细信息的用户(./user/1)。 基本上,我想知道是否有办法使link_to方法的语法,使用ruby或rails约定来查看任何清理器,但我不知道。 <% @details.each do |detail| %> <tr> <td><%= detail.name %><

    -1热度

    1回答

    错误:没有路由匹配[GET]“/预订/:ID /%3E:格式” 我想更新的属性时点击的“链接的link_to” .. <%= link_to 'Cancel', '/bookings/:id/(.:format)' %> 的routes.rb put '/bookings/:id/(.:format)' => "bookings#tocancel" patch '/bookings/:id/

    -1热度

    1回答

    我有两个控制器: MainController with pages: index.html.erb LoginController with pages: login.html.erb, signup.html.erb, pasfor.html.erb 这是我的路线 https://gyazo.com/4acf99c74bbb7999d580e32fd1496386 我创建 <%= l

    -1热度

    1回答

    我在我的页面上有一个客户端列表(只有名字),当我点击其中的每一个时,我想打开一个名为'clientdetails'的新页面,我在其中获得客户端的详细信息(I有地址和年龄); 什么我到目前为止是这样的: {{#each model as |client|}} <p> {{#link-to "clientdetails"}} {{client.name}} {{/link-to}}

    0热度

    2回答

    我正在用Ruby on Rails编写一个应用程序,在某些视图中,我想摆脱由'link_to'助手触发的自动空白。 <%= link_to liker.first_name.capitalize, user_path(liker) %> <!-- Example of link with a user's firstname (who liked a given content), re