Questions tagged as 'ruby-on-rails'

1
answer

Assign roles in an intranet

Good morning, I am currently developing an intranet with different tools, I am using devise and cancan to assign roles to users, however I have a problem which is that the same user will have a different role in each tool of the intranet so you...
asked by 12.10.2017 / 16:31
1
answer

Connection with a Firebird database

Good morning, my doubt arises because I can not find a gem or how to use a database of firebird 2.5 in ruby 2.3.0 and rails 5.0.0.1 I want to create an alternative connection since by default it used a mysql database, but I need to insert, up...
asked by 01.09.2017 / 20:46
1
answer

Rails Error when running tests: 'test': test_should_get_index is already defined in

I am working on an app. Rails 5.1.13 If I run an individual test, pass: rails test test/api/controllers/positions_controller_test.rb But when I want to run the entire folder, it fails: rails test test/api/controllers/ Giving this e...
asked by 04.09.2017 / 15:45
1
answer

Error creating user with devise from another controller

I want my admin to be able to create users of different roles, something that my normal view of registration does not do, but the default validation of devise gives me an error before it enters the page. my admin controller is: admin_co...
asked by 29.08.2017 / 06:26
2
answers

Problems with login omniauth-facebook ruby on rails

I am trying to make a connection with facebook and ruby on rails using the omniauth-facebook, but when I try to make a connection it sends me an error of "no implicit conversion of Symbol into Integer" , would be very helpful if you can tell me...
asked by 17.08.2017 / 17:48
1
answer

problem of authenticating users with devise?

I'm starting with ruby on rails I'm using the gem devise when I want to enter an email with a password I get this error What is the reason?     
asked by 14.08.2017 / 04:07
1
answer

Consultation and Validations in Rails

I'm doing a page in which users can request access to different areas of a company for that I use 2 Access models and another Request The problem: It is desired that users enter the access code (only codacc is not repeated) and this is val...
asked by 20.08.2017 / 02:17
1
answer

record nil after post

I want to edit a record with an action in the controller but when the record is passed, nil arrives and of course I can not edit it. Attached the driver, the model and the view. You can see the code on GitHub (it's a very basic code...
asked by 23.06.2017 / 20:21
3
answers

Ruby on Rails helps with models, namespace and many-to-many reactions

I have problems managing the namespace , I have the following models: class Administradora::Owner < ApplicationRecord has_many :owner_mails, foreign_key: :administradora_owner_id has_many :junta_mails, through: :owner_mails end class...
asked by 27.06.2017 / 18:15
1
answer

Update total stock of products

I am trying to create a stock from the new products that are created with the System Purchases. All Compras have a ItemCompra , with a certain product_id and product.quantity , these are nested using a accepts_nested_attribut...
asked by 19.06.2017 / 14:36