Skip to content
#

activerecord

Here are 799 public repositories matching this topic...

vdegove
vdegove commented Mar 19, 2020

For now, there is no mention of Webpack in the official guides – neither on edge guides – except for Ruby on Rails 6 release notes and upgrade guide. The documentation of the Webpacker gem is quite good, but a newcomer to Rails wouldn't know at first that he needs to have a look to it.

Specifically, it would be good to have a mention of Webpack in the following guides:

  • The Asset Pipeline
jeduardo824
jeduardo824 commented Jul 18, 2019

After facing an issue caused by Ransack interpreting 1/'t' as true and some unsuccessful research, I found about the sanitize args and the recommended way to skip them. The documentation never mentions that ransackable_scopes_sanitize_args must be a class method and the example shown defines an instance method.

I think that's worth a documentation update, making more clear how to use th

tmr08c
tmr08c commented Mar 22, 2020

After generating annotations using the Yard doc format, running migrations does not update the annotations.

Commands

bundle exec annotate --models -f yard

Generates:

# == Schema Information
#
# Table name: users
#
# @!attribute id
#   @return []
# @!attribute name
#   @return [String]
# @!attribute created_at
#   @return [Time]
# @!attribute updated_at
jeremylynch
jeremylynch commented Jul 13, 2014

I have found that @activity.trackable does not work when there is a default_scope which excludes the tracked object. I found a working monkey patch (see below), though is there a more appropriate solution? Would it be possible to override this default_scope when it's present?

PublicActivity::Activity.class_eval do
  def trackable
    trackable_type.constantize.unscoped.find trackabl
reisner
reisner commented Apr 14, 2016

Hi there,

I have a codebase that uses establish_connection. I used Octopus in another (unrelated) part of my app. I did not notice that the parts of the code that used the connection from establish_connection were affected until I shipped to production. After looking through the codebase I realized that octopus_establish_connection actually says I do NOT want to use octopus for this connec

joshcobalt
joshcobalt commented Mar 17, 2019

The documentation is lacking any usage of .Dispose() (or wrapping with a using() block) on the instantiated sql connections.
e.g. https://sqlkata.com/docs/execution/setup

Is this being called somewhere in the code for you that I'm not seeing?

Otherwise, the documentation/code should be updated to suggest a better way of managing the life-cycle of the connection object. Many people will jus

PaulCharlton
PaulCharlton commented Mar 17, 2020

reconcile config options with TinyTDS and documentation; coerce config values to expected types

extended discussion at: rails-sqlserver/tiny_tds#461
copied here =>


TinyTDS v2.1.2 and current HEAD

Current State:

At the moment, the only "false" values for these configs are "nil" and the boolean value false, whereas all non-nil string values, incl

jvenezia
jvenezia commented Feb 12, 2019

Thanks a lot for this gem, really helpful 😄!

We added those to our test suite, ensuring we don't have new database problems in the future.

Here is an example of how we use it :

  describe 'Unindexed Foreign Keys' do
    before { Rails.application.load_tasks }

    let(:allowed) do
      {
        'users' => ['allowed_id'],
        'articles' => %w(other_id allowed_id),
      
ConfusedVorlon
ConfusedVorlon commented Jul 27, 2017

test this in the live example
type 1 in the student name field

expected:
student1 should show (if they exist)

actual:
exception and no records returned

by the time the query reaches search_terms(query), query is of Integer class and query.downcase triggers the error

I'm fixing this with

  	def self.search_terms(query)
  		#integer queries are sent through as integer class
ipolevoy
ipolevoy commented Nov 5, 2019

how to:

  • How to configure for standalone apps
    • Single connection
    • Multiple connections
  • How to configure using a properties file
  • Override form system environment vars
  • Override from system properties
  • Configure and override in code.
  • Configure and override in ActiveWeb apps
    • Configure DB-Migrator
    • Configure connection pools

Improve this page

Add a description, image, and links to the activerecord topic page so that developers can more easily learn about it.

Curate this topic

Add this topic to your repo

To associate your repository with the activerecord topic, visit your repo's landing page and select "manage topics."

Learn more

You can’t perform that action at this time.