Multi-tenant: Different user set for different databases

0
Rails
Hi, I am building an application where I have a requirement for different user set for different databases. Can someone please guide me, how can I achieve that using apartment gem. I am using MySQ...
Conal Beaty posted

no routes match [post] when creating a user with form_with using devise

0
Rails
``` <% if !user_signed_in?%> <%=form_with(model: @user, local: true, url: new_user_registration_path, method: :post) do |form| %> <%= form.label :email%> <%=...
AMOS DJORO Nicolas posted

Detect Week Days

0
Rails
Hy to all! :) I have school application. In this app all rooms only work in especifc days "Tuesdays and Thursdays" for example. A need detect this days in month and put one checkbox for verfy st...
Jhonatan Petronilho posted

Problems with 'generate' command.

4
Rails
Hello everyone, as you read in the title I have an issue with the 'generate' command from the terminal. following you will find pasted the command i am giving: ``` MacBooks-MacBook-Pro:squirrool...
Zanger02 replied

How do I process request with parameters

2
Rails
i am new to ruby on rails, just run the examples https://guides.rubyonrails.org/getting_started.html#installing-rails I just wonder if I want list all the articles with certain string in the title...
mike zenon replied

How do I create a parent record from the child when the parent doesn't exist?

1
Rails
Hi team, I've trying to model books, chapters, and notes. I have the following: ``` class Book < ApplicationRecord has_many :chapters has_many :notes end ``` ``` class Chapter < Applica...
Nino Rosella replied
Solved

Manipulate photos already on S3 or Spaces

2
Rails
Scenerio: User uploads a huge file to S3 or Spaces. Question: How can I set up a job or worker to go into S3 or Spaces and resize that file at a later time, or even batch all of the days uploaded ...
Ryan Carter replied
Solved

Form Object for devise authentication

1
Rails
Hi all - I need to create a signup from having company details along with user details. Currently I am using devise for authentication. I would like to create a form object rather than using accept...
Zanger02 replied

Is it better to switch from scratch to Devise ?

0
Rails
Hi everyone, I'm working on a project since some time now and made up some authentication system from scratch thanks to Michael Hartl among other resources... I was just thinking about the idea to...
Damian Nelwep posted

Table join and data retrieve

0
Rails
how can I link user model table with another model table and based on current_user login I want to retrieve data from second table
Deepika posted

Rails Button_tag not submitting edit form, but submits new form

11
Rails
I am using the following to submit my form when creating a product. ``` <%= button_tag("Create", type: "submit", form: 'new_product') %> ``` However, the issue I am facing is that when I tr...
Alan Reid replied
Solved

FATAL error on hitting Rails API

1
Rails
Hi, I am beginner in ruby/rails. I have a rails api which when curled directly works as excpected. But, when invoked through vent(wrapper on kafka queue) returns 4xx error. I have verified that ...
Srilekha Thirumalaisamy replied

ActionController::InvalidAuthenticityToken error

0
Rails
Hello, I'm getting ActionController::InvalidAuthenticityToken error, even after sending csrf token in the post request. On which cases, do i get this error can anyone please enlighten me. Thanks.
ravitej177 posted

ActionController::RoutingError (No route matches [GET] "/assets/images/4.jpg"):

3
Rails
How to resolve this issue: `ActionController::RoutingError (No route matches [GET] "/assets/images/4.jpg"):`
Alan Reid replied
Solved

Upgrade to Mojave on Mac OS

5
Rails
Hi Chris - I am running Sierra (not high Sierra) on my fairly new Mac (summer 2017). I need to upgrade to Mojave and am afraid I will break my ruby/rails dev environment (like I did when I upgraded...
Chris Oliver replied

How do we show dynamic data in .erb file like from a json file?

0
Rails
I have a view file index.html.erb in my view folder and there I am showing some data in the form of Table(bootstrap table) and this is a static table so I had to write so many lines of HTML for thi...
theshashiverma posted

Separate Asset Pipeline

1
Rails
Im building a webapp that has an admin panel... I separated this by creating a new folder in the controllers 'admin' and also on my views... This way I can have two completely different styles, one...
Nelson replied
Solved

Where do this code go? (Refactoring Rails Workers)

5
Rails
Hey! I have two different workers ``` #app/workers/website_worker.rb class WebsiteWorker def perform(website) do_this_action(website) end def do_this_action(website) ... end ...
Arjun Rajkumar replied
Solved

Improve on these ActiveRecord requests?

4
Rails
I am trying to get the top 5 products, based on the impressions that product has recieved. Now the code below is working ok, but its not in the right order, and I cant work out a better way to get...
Alan Reid replied

Do I have to create a controller for users using Devise or where can I find its actions ?

2
Rails
I'm having some trouble setting up Paperclip gem to setup profile pictures for the users of my app and I need to access users_controller. Since I'm using Devise, I don't really know where I can fin...
kadammanali987 replied

Want to stay up-to-date with Ruby on Rails?

Join 90,472+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.