Questions tagged [ruby-on-rails]

Ruby on Rails is an open source full-stack web application framework written in Ruby. It follows the popular MVC framework model and is known for its "convention over configuration" approach to application development.

-1 votes
0 answers
22 views

Convert json response into graphql [closed]

Hey can any one help me to convert above json response into graphql Convert the below json response into graphql query in ruby on rails. Below are custom json response we need to convert into graphql ...
user avatar
0 votes
1 answer
12 views

Referencing different names in joins with scopes

I have a polymorphic association and sometimes I want to preload it's associations. When I left join the model, my WHERE filters get lost because they don't referenced the named association. SELECT ...
user avatar
  • 4,654
0 votes
0 answers
10 views

Some Currency symbols not showing in Ms excel

I'm generating a CSV like this ::CSV.generate(headers: true) do |csv| csv << ['Date', 'Transaction', 'Order Total', 'Wallet Amount', 'Wallet Balance'] fetch_data.each do |data_response| ...
user avatar
0 votes
0 answers
22 views

Why am I not being able to stay loggedIn using the jwt token?

Im using JWT for loggin and signing up users on my web app.I have a react front end and ruby on rails backend and Im somehow trying to keep my user logged in but its not possible becuz of this error ...
user avatar
0 votes
0 answers
15 views

Module not found: Error: Can't resolve './src/main.js' Vue 3 on Rails

I'm trying to create an application with Rails and Vue 3. Everything works fine on my local host but when I try to push it on Heroku or when I type in my terminal "npm run build" I have this ...
user avatar
0 votes
0 answers
12 views

How to Authenticate Google youtube api with ruby, Signet , google api gem?

ERROR: Request had invalid authentication credentials. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/...
user avatar
-1 votes
1 answer
23 views

How I can use param in url without creating table in database

I have a controller that works without a table in the database. At the moment, there is an action index that performs a request to the api from which it performs the action. Route looks like /...
user avatar
-1 votes
0 answers
22 views

I want to hide the user id with devise-token-auth (I want it not to be included in the response)

Premise ruby 2.7.5 Rails 6.1.6.1 devise (4.8.1) devise_token_auth (1.2.0) What I want to achieve When registering and logging in with devise-token-auth, I want to avoid including the id in the ...
user avatar
  • 1
1 vote
3 answers
18 views

How should I set up basic authentication headers in RSpec tests?

It'd be really handy to know if this is correct or a bit off before I start doing this all over the place. Im trying to set up an API and I want to be able to access current_user in my controllers. ...
user avatar
1 vote
2 answers
21 views

Rails admin panel: User list showing bug

I'm currently trying to get used to rails by creating a website with admin and user. However, when displaying the user list in admin dashboard, for some reasons these lines appear: [#<User id: 1, ...
user avatar
0 votes
0 answers
20 views

Empty value in activeadmin for checkboxes list

I use checkboxes list for enum to select multiple values in activeadmin: c.input :weekdays, as: :check_boxes, collection: BusinessHour.weekdays.keys For some reason there is hidden value added: <...
user avatar
1 vote
1 answer
37 views

Render partial after ajax request

I am creating a form where if the user enters in an URL, my code will return an image url. When the result is successful, I want to update the partial that displays the image without reloading the ...
user avatar
0 votes
1 answer
31 views

RAILS : PG::InsufficientPrivilege: ERROR: permission denied to create extension "pgcrypto" HINT: Must be superuser to create this extension

I am taking over a project started by a developer two years ago. I can't start the migrations I get the error message below: "An error has occurred, this and all later migrations canceled: PG::...
user avatar
0 votes
0 answers
14 views

Search with Array of values Ransack

I'm working with ransack and using its form like <%= search_form_for @search, url: box_index_admin_medleys_path do |f| %> <div class="col-md-4 col-xs-12"> <div class=&...
user avatar
1 vote
1 answer
29 views

How to include @apply CSS code for reusing TailwindCSS styles with tailwindcss-rails?

I’m using tailwindcss-rails gem in Rails 7 project with asset pipeline. I need to reuse TailwindCSS styles, for example: .pagy-nav { @apply flex space-x-2; } I can put this code in app/assets/...
user avatar
  • 35.1k

15 30 50 per page
1
2 3 4 5
22244