1) Views structure
Assuming I have two sets of views, set A and set B.
Both sets are similar having the view index.html.erb and the partials _index.html.erb , _new.html.erb , _edit.html.erb , _table.html.erb...
This error happens when the user does not select the option of the select field.
The error up would be handled if it did not have the collect:
NoMethodError in Subdisciplinas#create
Showing _form.html.erb where line #18 raised:
undefined meth...
I made the select gender field this way:
model:
enum sexo: [:feminino, :masculino, :desconhecido]
def self.sexes_for_select
sexos.keys.map{ |x| [x.humanize, x] }
end
form:
<%= f.select :sexo, Pessoa.sexes_for_sele...
Below I exemplify my need in a code where I need to redefine variables such as @dispute = dispute to be instance variables and the template loaded by ERB can access them through binding :
class Remittance::ExportService
def init...
The Rails interpreter is sending me this message in the following line of code:
...
<li>
<%= form_tag("search", { method: "get", class: "navbar-form navbar-right", role: "search" }) do %>
<div class="inner-addon right-addo...
I have a code that on my backend it returns true or false, I'm working with ruby and rails 5.
So I have it's an if or so ja:
<% if @order? %>
<h2> teste 2 <h2>
<%else>
<h1>teste 1</h1>
<%end>...
I would like your help with this issue below
I have 3 Tables:
Product Purshase Supplier
supplier_id product_id name
class Purshase < ActiveRecord::Base
belongs_to :product
end
class Product < ActiveR...