similar to: [PATCH] Add :touch option to has_many associations

Displaying 20 results from an estimated 5000 matches similar to: "[PATCH] Add :touch option to has_many associations"

2010 Apr 18
1
Add shorthand support for routes like /projects/status(.:format)
Hi, when trying to migrate Signal to Rails 3 I tried to use the shorthand route for: match ''/projects/status(.:format)'' but it thrown an error because the controller was not specified. This happend because actually the shorthand routes only work with routes without optional parameters. The modification to support routes ending with a optional parameters is very simple, as can
2010 May 27
4
[PATCH] Rails 3: fields_for helper doesn't work with association proxy objects
Request for eyeballs. :-) Mongoid uses association proxy objects. It overrides #nil? => false when the association is missing. However since it uses proxy objects, !!assocation is always true. I have created a ticket with a patch that changes the association nil test to call assocation.nil? rather than use implicit coercion of the variable. See:
2007 Jun 27
5
Filter Ordering in Edge Rails (Rev 7143)
Filter chaining appears to behave in differently than Rails 1.2.x. It seems that I''m getting a lot of errors along the lines of: ActionController::ActionControllerError: filter #<ActionController::Filters::ClassMethods::BeforeFilterProxy:0x322f468 @filter=#<ActionController::Filters::ClassMethods::SymbolFilter: 0x322f4b8 @filter=:login_required>> was in the wrong place!
2008 Jan 21
8
Polymorphic URL helpers documentation and fixes
Yesterday I answered a question regarding polymorphic URL helpers on Core ML and noticed that the module has no documentation. I''ve documented it and rewritten unit tests using Mocha. I also optimized some of the code slightly (nothing major, though). The patch also includes two fixes by Geoff Buesing, who has done awesome work in this area in the past.
2007 May 07
7
A little love for acts_as_taggable #8279
I was working with acts_as_taggable earlier and thought I could make it a bit friendlier. I submitted a ticket and patch #8279. Basically, there are three differences. 1. Fixed the deprecated :dependent => true 2. Added migration generator (it has really specific requirements on table layout, so might as well generate it). 3. Expanded the README to explain using the migration and to include
2007 Jul 16
6
RubyToken::AlreadyDefinedToken and Edge Rails Docs
I''m having a wee bit of trouble building documentation for Edge Rails (rev 7187). When I attempt to run the doc:rails taask (or any doc:* task), I get the following error: -- BEGIN -- rake aborted! uninitialized constant RubyToken::AlreadyDefinedToken /Users/jherdman/Projects/crosslisting/vendor/rails/activerecord/ lib/../../activesupport/lib/active_support/dependencies.rb:263:in
2007 Jul 06
4
JOINS clobbering ids or other fields.
I just found this ticket because I noticed the same issue. http://dev.rubyonrails.org/ticket/6251 The official response was that it''s not a bug because when you use :joins you are "riding close to the metal". But I''m at a loss as to figure out why this behavior even needs to exist. Every table (except HABTM links) in a typical Rails app is going to have an id
2007 Oct 24
5
Utility that checks outdated patches
I just noticed I frequently encounter patches that need to be updated because of applied changes. Maybe this can be automated? Not automating the "updating of the patch" part, but the part where a comment is posted to the ticket so the submitter is informed. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups
2007 Apr 08
8
SQLite3 build is broken because calling rollback!() doesn't prevent COMMIT
I know why SQLite3 is broken. This code: Topic.transaction do |transaction| transaction.rollback! end results in the following database commands: BEGIN; ROLLBACK; COMMIT; In other words, there is a COMMIT when no transaction is in flight. MySQL and Postgres are coll with it, but SQLite3 blows up with indignation. Recorded as a ticket: http://dev.rubyonrails.org/ticket/8030
2005 Aug 09
3
Adding created_by and updated_by trouble
Hi everyone. This is a real noob question that I''m hoping someone out there can help me with. I have followed the tutorial How to Ad created_by and updated_b<http://wiki.rubyonrails.com/rails/show/Howto%20Add%20created_by%20and%20updated_by>y and it works ok for retrieving the data. I''m using the Login_Generator. I cannot get it to work on create or update. I think
2005 Oct 03
3
Boolean quoting, postgresql
http://dev.rubyonrails.org/ticket/1117 I''ve attached a patch to ticket 1117 which fixes it so that booleans are escaped as booleans, not integers. Specifically, this situation will now work find_all(["send_date=? and sent=?", Date.today, false]) Which matches peoples expectations, but it causes some problems with the postgresql unit tests. Specifically, the use of
2005 Jun 29
3
Setting the value of a primary key field
I have a table that is to hold all ISO 639 language codes: alpha3t, alpha3b, alpha2, that bunch. It also (indirectly) holds language names, but that''s off-topic. alpha3t is the primary key, so I''ve told Active Record about this by saying set_primary_key "alpha3t" within the Language model. (Don''t try to call your models things like ISO639 (won''t work
2007 May 17
4
Namespaced model valid #to_xml support in ActiveRecord, ActiveSupport and ActiveResource
Hi, Attached are links to two patches I submitted via the RoR Trac system a week or so ago: http://dev.rubyonrails.org/ticket/8305 http://dev.rubyonrails.org/ticket/8308 I refrained from creating a new Trac ticket for ARes, which will be affected if both of these patches are accepted by Core. There are a couple of workarounds for this issue, but it would be nice for AR, AS and ARes to output
2010 Nov 05
9
[patch] Let's use <%== %> instead of <%= raw() %>
I''ve submitted a small patch to make Rails behave properly with the Erubis <%== %> construct. For some reason the current behaviour of that tag in Rails 3 is to escape the contents _twice_ which is probably a bug. I offer three suggestions why this is a good idea: - The syntax is cleaner. It can avoid a lot of .html_safe and raw in your views. I especially like the conciseness of
2011 Apr 25
3
Active Record database time logging
I''ve been having a look through the code responsible for printing how much time was spent in Active Record at the end of an action. My reading of the code + experiments suggests that any database time after the render is not counted. It seems to me that in controller_runtime.rb in Active Record, append_info_to_payload should in fact read def append_info_to_payload(payload) super
2010 Jan 25
3
Dynamic attributes!
I want to create a general model ''Product'' that I will be able to store several attributes in it. For example the attributes :id :name :description are pretty stantard. So each product will have this attributes. However, I wanted to know if it is possible to create dynamic attributes. In the case of a cell phone device I might want to store the IMEI of the phone, this
2008 Feb 15
5
a year of rails magic
After working professionally with Ruby on Rails for a year, I decided to write an article on my experiences with the framework. http://nathany.com/developer/rails-magic Since I detail a number of things that I found unintuitive or could be improved upon, I am posting a link here on the Rails Core in hopes to stimulate David Heinemeier Hansson and the core team towards an even better 3.0
2006 Feb 18
14
Composite primary key support in ActiveRecord?
Hi, As I understand, composite primary keys aren''t supported in ActiveRecord yet. May I ask if there are plans for this feature? Better yet, if this feature is under development, how''s the progress going? I''m not trying to use legacy databases. I tend to think that using multiple integer column id''s (composite primary key) are often natural way to
2011 Jun 08
4
Cannot modify SafeBuffer in place
Upgraded from rails 3.0.7.rc1 to 3.0.8 today and ran into a problem when rendering haml: TypeError in Pages#home Cannot modify SafeBuffer in place Full Trace: activesupport (3.0.8) lib/active_support/core_ext/string/output_safety.rb:122:in `gsub!'' haml (3.1.1) lib/haml/compiler.rb:382:in `block in build_attributes'' haml (3.1.1) lib/haml/compiler.rb:358:in `each'' haml
2005 Mar 11
4
actionmailer settings
A couple questions: 1) How does rails no if you are in your test, dev or production environment? 2) Does anyone have an actionMailer server settings that will work on your standard local machine? I will use the one provided for my textdrive account but for testing on my machine I am getting connection refused. Thanks. Your Friend, Jonathan Kopanas http://www.kopanas.com