Questions tagged as 'ruby-on-rails'

1
answer

Problems with wiselinks and turbolinks

I need that, after clicking a button, a modal appears, within that modal there is a populated form (or not) with rails objects. The problem is that I can not change the accept header to js so that rails render (not printe the code on the screen...
asked by 11.03.2014 / 04:18
1
answer

Search inside another scaffold rails

I have a problem, an example I created two scaffold book and loan, then I created a controller and an index called report: rails generate controller RelatoriosEmprestimos index I want to make specific searches of scaffold loans on this cont...
asked by 12.06.2018 / 17:10
2
answers

How to group dates according to the month? Ruby + MongoID

I have a class that contains events and their start dates. I need to retrieve all records by grouping them so that the first few days are listed at a time. Example: 2014-01-01, 2014-02-01, 2014-03-01, 2014-01-02, 2014-02-02, 2014-03-02, ......
asked by 28.08.2014 / 16:56
1
answer

PDF Password and Custom Footer

I have a PDF file, which is a course, our company intends to make it available to users of a certain course online. To do this, I have to add password to open the file on the person's machine, and a custom footer, something like this: "Thi...
asked by 22.04.2014 / 21:07
1
answer

validating a field from another table in a specific model

Is it possible to validate the field of another table that is related in a specific model? For example, I need to validate an email field in a Orders table, but only emails from an internal user (which is in a Users table) . That is, who...
asked by 16.03.2015 / 15:28
1
answer

How to call a method with named parameters using a hash

I would like to know if you can pass parameters to a named parameter method via hash. Can you review the remaining parameters for another function as in the example below? params = {key: "value",key2: "value2"} def func(key1: nil, key2: nil, *...
asked by 11.02.2015 / 15:30
1
answer

How to give coverage for tests in completed Rails applications? [closed]

TDD is usually used during development. But when you get into a company, pick up the whole code zapped and see the urgent need for improvements and of course, coverage of tests? How to proceed? How do I test if all functionalities are implemente...
asked by 26.09.2014 / 22:17
2
answers

Alternatives for server and deploy of Rails applications [closed]

When I do some Rails application I configure my server with Nginx and Passenger, and I usually deploy via GIT or rsync. I know there are other ways to do deploy as well as server configuration. Is there any simpler and / or more performance-...
asked by 28.03.2014 / 18:37
2
answers

How to use for in Ruby?

I can not use for equal use in Java . I'm trying to figure out if a dice is a hook. An honest casino owner has cast%% of them, given the% of results of the rollouts, determine the number of occurrences of each face.     
asked by 13.04.2018 / 05:13
1
answer

Error initializing Redmine

After modifying one of my plugins under development in Redmine, it can not boot again and returns me the following message: ActionView::Template::Error (can not load translations from D:/Ruby/B233/plugins/uc_rh/config/locales/pt-Br.yml, expect...
asked by 19.03.2014 / 14:17