Questions tagged as 'ruby'

1
answer

Null values in check box's

In my application, it is necessary that if the user unchecks all check boxes informed to him, a Array nulo or []. I'm using params[:parametro1][:parametro2_ids] ||= [] after initializing my Action UPDATE, but if I try to...
asked by 11.06.2014 / 15:30
2
answers

accepts_nested_attributes_for in Rails 4

Expensive! I'm having a hard time because I'm new to Rails. I'm trying to generate a form with two templates through Nested Form Rails. It's a simple template. "Engine" has one or more "parts", and "part" has only one "motor". This way...
asked by 11.06.2014 / 21:44
1
answer

Creating a new view on a Controller

In a Rails project, I created a Scaffold Responsability and consequently Rails created the whole basic structure of this Scaffold. I've created a has_and_belongs_to_many relationship between a responsability model and a Knowledge...
asked by 27.05.2014 / 14:28
1
answer

Deploy with Capistrano

I have to run my rails app on a machine and the DBMS (in this case PostgreSQL) on another server. I configured database.yml as follows: production: <<: *default database: nomedobanco username: username password: senha host: ban...
asked by 29.05.2014 / 00:09
1
answer

How to solve the error ActiveRecord :: StatementInvalid: PG :: UndefinedTable in rails?

I'm developing an application in rails and the following error appears in my bank at the time I try to perform a rake db: migrate. I have tried to give a drop in the bank and a create in sequence, however the same error happens. The curious thin...
asked by 18.06.2014 / 17:26
1
answer

How to open a form inside a modal with Rails 4 and Foundation?

I have a product registration in Rails. I am using Zurb-Foundation 5 as lib in Front End. How do I call an include form within a modal window in the Foundation. I created a partial with the form and tried to insert it inside the div to be...
asked by 16.05.2014 / 18:13
1
answer

AbstractController :: ActionNotFound for a destroy action

Hello, I have two applications running in Heroku with the same code, but I'm having a problem with the production version. When trying to make a request, I have the following log: AbstractController::ActionNotFound (The action 'destroy...
asked by 28.06.2014 / 17:30
1
answer

How to test the locals on a render?

I have the following question, I make my tests using Ministest, however I have a problem when testing the locals of a render ... I do not know how to test, for example: Controller: def salvou render('cadastro/salvou', locals: {id: params...
asked by 30.06.2014 / 21:23
1
answer

How to create Access rules for a plugin?

I'm developing a plugin for REDMINE. I have menu created using :top_menu , so it stays at the top of REDMINE, next to Administration, etc ... However, I want that not all users logged into the system, see this "Button". Only User...
asked by 09.04.2014 / 15:53
1
answer

Calendar in Rails 4

I would like to create a calendar in Rails 4. I followed some tutorials on the internet, however, I did not succeed. I was able to do the table_builder calendar in "per month" format, but I need a lot more of the weekly view (with hours on the l...
asked by 24.06.2014 / 14:17