Skip to content
#

Rails

rails logo

Ruby on Rails (Rails) is a web application framework written in Ruby. It is meant to help simplify the building of complex websites.

Here are 7,179 public repositories matching this topic...

dhh
dhh commented Feb 2, 2020

This is a very common pattern:

class MyChannel < ApplicationCable::Channel
  def subscribed
    if box = identity.boxes.find_by(id: params[:id])
      stream_for box
    else
      reject
    end
end

You're looking for a record based on a parameter, and if you find it, you'll start streaming. If the record isn't there, you reject the connection. We should extract `Add Ac

MatthewKennedy
MatthewKennedy commented Feb 19, 2020

Would be nice to be able to add more unique information on a per store basis.

Useful field Examples:

  • Full address (replace the static address that is hard coded into the footer).
  • Dedicated field for customer facing contact email address (in case you want to use a separate send from such as a no-reply@you.com).
  • upload store logo.
  • upload store favicon image.
poloka
poloka commented Dec 12, 2019

I wanted to ask if a migration guide was created for going from a 1.4.3 version to a 2.x version? If there is no migration guide, what non-passive changes were introduced that caused the 2.x version bump?

yuki24
yuki24 commented May 24, 2018

We've received a good amount of feedback for formatting values instantiated within the page_entries_info method. Currently we don't have a concrete interface for the method and Kaminari users need to implement a decorator that's not intuitive. It would be helpful if the method sends a certain sed of messages to the collection object. I'm not sure what the interface should look like, but here i

eliotsykes
eliotsykes commented Oct 3, 2019

I'm sorry to post an issue that is missing crucial evidence, but some debugging of a recent config loading bug makes me suspect that the react-rails railtie.rb may be modifying the load order of initializers, and preventing the values in Rails.application.config being as expected.

Whether this happens or not appears to be partly dependent on where in the Gemfile the react-rails gem is l

Undistraction
Undistraction commented Aug 2, 2016

I think the guidance for configuration could do with some clarification. It is unclear from the guidance how gem initialisation code that is environment-specific should be handled. Obviously in an ideal world, there would be a single initialiser per gem and any differences would be supplied via envs, but in cases where there are more substantive differences, for example a gem should only be initia

jonrohan
jonrohan commented Apr 9, 2018

I want to avoid checking SVG files into this repository. I feel strongly that having it here to, the confusion of where to contribute to Octicons increases.

However we need to address questions like primer/octicons#213

In my ideal world, we would include in the release script a line that zips up the /build/ folder and attaches it to a release on this repository. A

brakeman
avit
avit commented Feb 6, 2020

Is your feature request related to a problem? Please describe.

The sanitize_sql method signature is designed to receive an array with ["sql template", *values] that it uses for quoting and replacing placeholders.

When a string is passed instead of an array, sanitize_sql is a no-op, and the original string is returned unchanged.

Describe the solution you'd like

Queries lik

hallelujah
hallelujah commented Aug 4, 2016

This can be added to spec/finders/active_record_spec.rb

  it 'returns correct `size` for last page' do
    users = User.paginate(:page => 3, :per_page => 5)
    users.total_entries.should == 13
    users.total_pages.should == 3

    users.size.should == 3
  end

The test is failing:

bundle exec rspec spec/finders/active_record_spec.rb:420                                         
kiambogo
kiambogo commented Oct 8, 2019

Description

Buffalo test should be allowed to take a timeout argument, similar $ go test -timeout 300ms.

Steps to Reproduce the Problem

Buffalo test does not currently provide a timeout option, as seen in the source code (https://github.com/gobuffalo/buffalo/blob/master/buffalo/cmd/test.go) and by testing with the likes of $ buffalo test -timeout 10m

Expected Behavior

ghost
ghost commented Feb 9, 2020

All in all this experience has been terribly confusing, especially for me who is a beginner to Rails and thought everything would be ready to go after rails new myapp.

Instead it turned out I had to downgrade Yarn. I also struggled to install basic packages like jQuery and had to resort to outdated and flat out wrong 3rd party tutorials out there on the web.

Is there any way to make this e

graphql-ruby
connorshea
connorshea commented Oct 12, 2019

I've been trying out 1.10.0.pre1 and adding pagination to my GraphQL API today, and I wanted to give some feedback on the documentation:

  • There's a link to a non-existent page at the top of custom_connections.md: {% internal_link "Using Connections", "/pagination/using_connections" %}.
  • Th
ndbroadbent
ndbroadbent commented Oct 14, 2019

Hello!

I think I've figured out a good way to get SimpleCov working with Spring. For my Rails application, preloading the app would require some classes in my ./app directory, and this would cause some inaccurate coverage to be reported (any lines that were required during preloading were missing in the coverage.) I figured out how to fix this issue by starting SimpleCov in config/spring.rb

JonRowe
JonRowe commented Dec 18, 2019

💥 Proposal

What feature you'd like to see

Link to issues on github on issue view / menu view.

Motivation

Not everything renders correctly in octobox, and stuff is squashed, it would be useful to jump an issue out and see it in the original context.

Pitch

A link from the issue number displayed in the view to its actual page would make it easy to jump out and use the f

chatwoot
composerinteralia
composerinteralia commented Feb 7, 2020

Rails generators can be a bit of a mystery for folks unfamiliar with them. While trying to explain to somebody where some of the file manipulation methods come from it took me way too many steps to find the documentation I was hoping for:

  1. The method wasn't defined in the suspenders generator I was looking at, so walked up the inheritance chain to Suspenders::Generators::Base
  2. Not define
krtschmr
krtschmr commented Nov 21, 2019

docs say:

To annotate just your models:

annotate --models

but if i run it, i get a mess

 annotate --models

Annotated (19): app/models/coin.rb, test/models/coin_test.rb, test/fixtures/coins.yml, app/models/crypto_payment.rb, test/models/crypto_payment_test.rb, test/fixtures/crypto_payments.yml, app/models/ledger_entry.rb, test/models/ledger_entry_test.rb, test/fixtures

Created by David Heinemeier Hansson

Released December 13 2005

Organization
rails
Website
rubyonrails.org
Wikipedia
Wikipedia
You can’t perform that action at this time.