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.
In a Rails 5.2 app, I have a class Foos::SomethingSerializer, stored in app/serializers/foos/something_serializer.rb.
In Development, this controller code works just fine:
I am trying to migrate my repository from gitlab.com to my newly installed self-hosted Gitlab which is on my company's internal infrastructure - gitlab-private. I was working on gitlab.com but now we ...
I've two models within the same namespace/module:
class Demand < ApplicationRecord
belongs_to :purchase_order, inverse_of: :demands, counter_cache: true
I'm beating my head on trying to solve this issue. I have a feature spec that I'm writing where I have multiple scenarios written and I want them all to run within the same user session. The tests run ...
When I look at a rails cache key in redis, it looks like this:
I want to pass a hash to the render method. In my console everything works fine when I do this:
@object = Object.find(params[:id])
@hash_object = @object.to_liquid
@template = Liquid::Template.parse(&...
I'm trying to display items by an external popularity score that gets generated by looking at the number of "likes" the item has.
I hope all is well. Im trying to edit sign up and sign form but my edits for the views/users/registrations and sessions directories wont take any effect. Am I doing something with the route?
I Have a table users with a integer column called points. How can I query the first 15 users who added the most points?
In Rails 6, I need to add .js.erb support for Webpacker and I'm experiencing the error while building even default .erb:
Module build failed (from ./...
I have the following situation
has_many :publications, through: :book_publications
I am trying to create a base in Postgres integrated with ruby, I have already installed all the dependencies. But running "rails db: create"
I get this error "PG :: ConnectionBad: FATAL:...
im using flag_shih_tzu gem and at my User model I include that lines
has_flags 2 => :admin,
3 => :moderator
I have a column flags as well in User table :
I am trying to use bootstra-star-rating in my rails application using this: http://github.com/kartik-v/bootstrap-star-rating. After adding css and js files, stars are not showing up.As you can see ...
I have two user types, Parent and Child.
I have an active_for_authentication method on Child which uses a is_suspended column on Child which works perfectly.
However a Parent can 'masquerade' into a ...