Questions tagged as 'ruby'

1
answer

Placing an iterator on a table in a .pdf file.erb

I have a table where there is a list of people I want to put a counter to get a number on the side of each item in the list: type like this: 1-Mary. Segue arquivo financial.pdf.erb''<tbody> <% @people[:people].each do |p...
asked by 12.04.2016 / 18:58
2
answers

Why only save the last record in the table?

Well, here's a little help, please! <%= form_tag(portabilizar_portabilidades_path, name: 'form', method: :get) do %> <table class="table table-condensed table-bordered table-hover"> <thead> <tr>...
asked by 17.05.2016 / 21:19
1
answer

Grouping hashes by value in Ruby and manipulating them

I have this array with hashes that I simplified to get smaller. My goal is to join with marca of carros to make a small report showing how much marca is profiting based on compras . Notice that "tag1" repeats 2 times a...
asked by 20.01.2016 / 19:08
2
answers

Extract a new array from an array - Ruby

I have the following output: => [ [ 0] [ [0] "CELULA", [1] "LENNA ", [4] "jul 01", [5] " 2015 12:00:00 AM", [6] "N", ], [...
asked by 22.01.2016 / 02:17
1
answer

Ruby on rails - Insert a render inside an html tag

How do I add a render inside an HTML tag? For example, this works here ok : <%= render :partial => "feed/new_card", :locals => { :main_image => image_tag('feed/new_badge.jpg') } %> <div><%= main_imag...
asked by 29.12.2015 / 18:42
2
answers

Because param ["value"] is returning nothing

I am creating a project in Ruby on Rails, where I create a cry with the following route in postman: POST:http://localhost:3000/api/yells { "user_id":"1", "title":"caneca", "desciption":"beber", "yell_type":"oferta", "price"...
asked by 26.01.2016 / 18:39
1
answer

NoMethodError in User # new RubyOnRails

controller: class UsuarioController < ApplicationController def index @usuarios = Usuario.order :nome end def new @usuario = Usuario.new end def show @usuario = Usuario.find(params[:id])...
asked by 16.12.2015 / 17:31
1
answer

Compiling css with sass in Windows

I installed ruby on windows and installed sass. I have a css file that I want to use, but I do not know how to do it.     
asked by 15.01.2016 / 14:52
1
answer

Ruby doubt apis

I was reading in the ruby documentation on the link about the default ruby classes, but I saw that it has more classes than documentation shows how yaml, where can i find these apis? I want to know which apis exist in ruby.     
asked by 18.09.2015 / 15:24
1
answer

Correcting HTML from a page using Ruby / Nokogiri

I'm having a little difficulty consuming an HTML generated by a third-party page where HTML is missing some closing tags. For example: <div> <li> <div> <div>test test </div> <...
asked by 15.09.2015 / 19:27