Questions tagged as 'ruby'

4
answers

How to make a table responsive using (Twitter) Bootstrap?

I'm working on a web application using Ruby On Rails 4 and much of the interface consists of tables. I would like you to suggest a way to detect the size of the screen in use and, based on this, hide certain columns from each table.     
asked by 11.12.2013 / 17:16
1
answer

How to program in Portuguese in Ruby on Rails?

I would like to know how I can program an application in Ruby on Rails instead of English. There are basically three issues to this: How to change the user interface in Portuguese? (ActiveRecord error messages, dates and times in extensi...
asked by 07.06.2014 / 20:38
2
answers

Ruby - What's the difference between using two dots or double quotes in a string?

In Ruby I can write some things in two different ways: I can do this: :algo Or this: 'algo' What's the difference?     
asked by 17.04.2014 / 15:57
2
answers

Equal sign in Ruby method definition

I came across the following method definitions and would like to know the difference between the first and second definitions. This first one does not have the equal sign in the definition: def nome nome_exibicao(:nome) end This s...
asked by 01.11.2017 / 20:47
2
answers

What are the size limits of variables in Ruby?

I would like to know the size limit of variables of the following types: String - What is the largest number of characters I can have in a single string ? Integer and Float - What is the largest and smallest number that can be repre...
asked by 26.05.2014 / 21:23
4
answers

Upload file to the current directory when running irb

It is possible to call the irb by passing as a parameter a library to be loaded (required): irb -r date But this does not work if I want to load a file into the directory where the command is executed: irb -r meuscript (assuming the...
asked by 11.12.2013 / 18:20
2
answers

Association with scope in Ruby on Rails

I have a Ruby on Rails application in which I have licenses, items that can be licensed, and a table that lists the two (What items in what quantity are present in the license?). Analogously to the items in a shopping cart. Some of the items...
asked by 13.12.2013 / 19:46
1
answer

What is the difference between 'for x in y' and 'Enumerable # each'?

We can iterate an Array / list in ruby in two ways: Using the for x in y syntax: > for x in [1,2,3] do > puts x > end 1 2 3 => [1, 2, 3] Using the method .each > [1,2,3].each do |x| > puts x...
asked by 17.02.2014 / 23:19
4
answers

How to set --no-ri --no-rdoc as default when using gem install?

Always giving the gem install I have to provide the parameters --no-ri and --no-rdoc, I would like this to be standard for this command! How can I do this?     
asked by 13.12.2013 / 13:31
1
answer

Rails application with offline mode

In a new venture, I need a simple application to stay in place if the internet connection is lost. Can someone explain me how to do this? I had thought about using the HTML5 persistence features in case of connection loss, and somehow I still...
asked by 20.09.2014 / 14:10