rails-activerecord
Parse before storing in MVC
I\'m getting started with parsing data and getting some structure from user supplied strings (mostly pulling out digits and city names).[详细]
2023-03-19 16:49 分类:问答Check if a table exists in Rails
I have a rake task that won\'t work unless a table exists. I\'m working with more than 20 engineers on a website so I want to make sure they have migrated the table before they can do a rake task whic[详细]
2023-03-18 01:28 分类:问答Rails & Devise: Two-step confirmation params error
This is a continuation of my woes and drama ... Run through: I can enter my email to register! I can click the confirmation link![详细]
2023-03-17 19:06 分类:问答Controller setup with three models?
I have a three models: Homework, Question, and HomeworkAttempt. homework.rb: class Homework < ActiveRecord::Base[详细]
2023-03-13 02:36 分类:问答Connecting Rails 3.1 with Multiple Databases
At ShowNearby we have been doing a very big migration to RoR 3.1 from PHP and we are facing several problems that may be some of you have solved before.[详细]
2023-03-08 01:48 分类:问答Rails 3 SQLite3 Boolean false
I\'m trying to insert a false boolean value in a SQLite3 table 开发者_开发技巧but it always inserts a true value.[详细]
2023-03-06 15:27 分类:问答Finding records based on different fields/columns?
I have a database that has stored information of some users. I know for example: User.find(1) will return the user开发者_JS百科 with id:1[详细]
2023-03-06 05:52 分类:问答a proper way to escape %% when building LIKE queries in Rails 3 / ActiveRecord
I want to match a url field against a url prefix (which may contain percent signs), e.g. .where(\"url LIKE ?\"开发者_StackOverflow中文版, \"#{some_url}%\").[详细]
2023-02-27 11:32 分类:问答How to reference a belongs_to association in a scope?
开发者_运维技巧#!ruby class Car < ActiveRecord::Base belongs_to:user end @cars = Car.where(:user_id => current_user.id).limit(10)[详细]
2023-02-25 11:03 分类:问答Combining custom joins with regular rails joins
I have models foo, bar, and baz like so # has a field join_condition_string class Foo < AR::Base :has_many :bar[详细]
2023-02-23 04:13 分类:问答