activerecord
Document search in RoR
Here\'s the deal: I have a RoR application with bunch of database items (indexed via Sunspot), some of them with file attachments (typically PDFs and plaintext files). What\'s the easiest way to inclu[详细]
2023-04-11 04:09 分类:问答How to drop DB indices before bulk loading in seeds.rb?
In my rails app I have a seeds.rb script which inserts lots of rec开发者_运维问答ords. In fact I\'m trying to load 16 million of them. It\'s taking a long time.[详细]
2023-04-11 02:15 分类:问答How to use activerecord-sqlserver-adapter with TinyTDS *and* an Integrated Security connection on Windows *without* saving a password in plain text
I\'m trying to use Rails 3.1. with the activerecord-sqlserver-adapter (3.1.1) and tiny_tds (0.4.5) on a Windows machine.In reading about TinyTDS and it\'s use of FreeTDS it looks like I can use Integr[详细]
2023-04-10 23:38 分类:问答Updating object with belongs_to associations and nested_attributes
I\'ve got problems with making update action for 开发者_开发百科one of my data objects. I\'ve got:[详细]
2023-04-10 18:58 分类:问答Proper way to prevent ActiveRecord::ReadOnlyRecord?
I\'m currently using Rails 2.3.9.I understand that specifying the :joins option in a query without an explicit :select automatically makes any records that are returned read-only.I have a situation wh[详细]
2023-04-10 18:31 分类:问答Why Active Record relation is not returned in console?
I have finally started upgrading my Rails apps from 2.3.8 to 3.1.0. I was watching RailsCasts (http://railscasts.com/episodes/202-active-record-queries-in-rails-3) about Active Record queries.[详细]
2023-04-10 18:23 分类:问答Rails 3 find_or_create_by
I\'m following http://railscasts.com/episodes/102-auto-complete-association Everything seems fine. I\'m trying to create an invoice and also a client on the fly. It does work. Everything cool.[详细]
2023-04-10 17:45 分类:问答Complement in ActiveRecord?
I am trying to find a complement using ActiveRecord and/or SQL. I have a collection of \'annotations\' that each have two relevant fields:[详细]
2023-04-10 14:16 分类:问答Grouping items that were created within a certain time of each other
I have a bunch of products (500k or so) in a database that were created over the last several years and I\'d like to group them together (Rails 2.3.14)[详细]
2023-04-10 11:27 分类:问答Ruby OOP terminology: How do you call "devise" and ":trackable" in this class?
Here is a Ruby ActiveRecord class: class User < ActiveRecord::Base has_many :user_tokens devise :tracka开发者_如何转开发ble, :confirmable[详细]
2023-04-10 04:38 分类:问答