Commit Graph

25987 Commits

Author SHA1 Message Date
Josh Susser
124c97fbe2 avoid warnings
This change uses Module.redefine_method as defined in ActiveSupport.
Making Module.define_method public would be as clean in the code, and
would also emit warnings when redefining an association. That is pretty
messy given current tests, so I'm leaving it for someone else to decide
what approach is better.
2011-11-27 14:15:40 -08:00
Josh Susser
10834e975a changelog & docs for GeneratedFeatureMethods 2011-11-27 14:12:46 -08:00
Josh Susser
61bcc318c8 use GeneratedFeatureMethods module for associations 2011-11-27 11:22:12 -08:00
Josh Susser
9cdf33af0b add test for super-ing to association methods 2011-11-15 23:32:58 -08:00
Josh Susser
7cba6a3784 association methods are now generated in modules
Instead of generating association methods directly in the model
class, they are generated in an anonymous module which
is then included in the model class. There is one such module
for each association. The only subtlety is that the
generated_attributes_methods module (from ActiveModel) must
be forced to be included before association methods are created
so that attribute methods will not shadow association methods.
2011-11-15 23:32:58 -08:00
Jon Leighton
8d1a2b3ecd Revert "Merge pull request #3640 from indirect/remote_ip"
This reverts commit 6491aadc52, reversing
changes made to 83bf0b626c.

See https://github.com/rails/rails/pull/3640#issuecomment-2752761 for
explanation.
2011-11-15 22:47:18 +00:00
Yehuda Katz
6491aadc52 Merge pull request #3640 from indirect/remote_ip
GetIp#to_s should never return nil. That's icky.
2011-11-15 13:59:31 -08:00
Vijay Dev
83bf0b626c refactor test_multiple_of 2011-11-16 02:36:36 +05:30
Andre Arko
d743954792 GetIp#to_s should never return nil. That's icky. 2011-11-14 16:43:21 -10:00
Jon Leighton
c7ab43ff06 Merge pull request #3632 from indirect/b8c85de
unit test for fix from a few minutes ago
2011-11-14 15:06:41 -08:00
Andre Arko
b8c85de620 add test for bug fixed in 4f2bf64 2011-11-14 12:29:51 -10:00
José Valim
25c9e44a21 Merge pull request #3631 from indirect/remote_ip
Force calculation of remote IP before using || operator
2011-11-14 13:27:36 -08:00
Andre Arko
4f2bf6491c Return the calculated remote_ip or ip
This was an especially nasty bug introduced in 317f4e2, by the way that an instance of GetIp is not nil, but GetIp#to_s could sometimes return nil. Gross, huh?
2011-11-14 11:23:33 -10:00
Andre Arko
cda1a5d5fe memoize the relatively expensive remote IP code 2011-11-14 11:20:57 -10:00
Andre Arko
00a0a4ddeb cleaner names 2011-11-14 11:20:20 -10:00
José Valim
9fa329b754 Speed up attribute invocation by checking if both name and calls are compilable. 2011-11-14 20:12:17 +01:00
José Valim
2088f1b3b4 Merge pull request #3626 from guilleiguaran/include-therubyrhino-gemfile
Added therubyrhino to default Gemfile under JRuby
2011-11-14 09:53:57 -08:00
Yehuda Katz
1df22bbb0f Merge pull request #3628 from oscardelben/refactoring
use any? instead of !empty?
2011-11-14 09:52:12 -08:00
Jon Leighton
be777b30d5 Add a note to REALEASING_RAILS about testing the gem locally before releasing 2011-11-14 17:08:24 +00:00
Jon Leighton
156784fef1 rake release should push the tag 2011-11-14 16:55:31 +00:00
Oscar Del Ben
af64ac4e5c use any? instead of !empty? 2011-11-14 16:56:05 +01:00
Aaron Patterson
11c9fc9364 Merge pull request #3371 from yahonda/fix_ora_00932_error
Fix ORA-00932 error when trying to insert 0 to DATE type columns.
2011-11-14 04:36:55 -08:00
Jon Leighton
ca3b468937 Sync changelog entry 2011-11-14 12:23:43 +00:00
Jon Leighton
4d8081b6e7 Add note about checking postgres tests before release 2011-11-14 12:17:13 +00:00
Guillermo Iguaran
49cd6a0ff7 Added therubyrhino to default Gemfile under JRuby 2011-11-14 07:07:38 -05:00
Jon Leighton
d023078b95 Merge pull request #3625 from guilleiguaran/sprockets-2.1.0
Upgrade Sprockets to 2.1.0
2011-11-14 03:40:17 -08:00
Jon Leighton
c7b84689a4 Add note about syncing CHANGELOGs 2011-11-14 11:29:57 +00:00
Jon Leighton
da02f792fe Sync CHANGELOGs from 3-1-stable 2011-11-14 11:28:12 +00:00
Guillermo Iguaran
e0eb2292bb Upgrade Sprockets to 2.1.0
This version brings bug fixes for performance and caching.
2011-11-14 06:25:03 -05:00
Yehuda Katz
2ec8d52b0c Merge pull request #3622 from noefroidevaux/issue_3595
Fix pull request #3609
2011-11-13 13:38:45 -08:00
José Valim
d37e169856 Merge pull request #3623 from indirect/remote_ip
Remote IP fixes/cleanup
2011-11-13 12:34:23 -08:00
Andre Arko
9c4532bf74 remove ignored flag, fixes warnings 2011-11-13 10:22:12 -10:00
Andre Arko
2d063c6269 turns out the tests expect remote_addrs.first 2011-11-13 10:20:55 -10:00
Andre Arko
2189bff732 correctly raise IpSpoofAttackError message 2011-11-13 10:20:29 -10:00
Andre Arko
8f0085a483 change tests to expect X-F-F over REMOTE_ADDR 2011-11-13 10:19:54 -10:00
Vijay Dev
e0efe48c45 Merge branch 'master' of github.com:lifo/docrails 2011-11-13 22:29:26 +05:30
Vijay Dev
30122307a1 copy edits in getting started guide 2011-11-13 22:27:44 +05:30
Vijay Dev
af51409de4 Revert "Move Tip up higher so users who are fine with SQLite can skip to the next section"
This reverts commit 4bf057b866.

Reason: Prefer to keep the configuration of all databases at the same
level
2011-11-13 22:07:54 +05:30
Vijay Dev
c8c08bd000 Revert "Use rails help new instead of rails new -h"
This reverts commit 6ac65c9202.
2011-11-13 21:57:39 +05:30
Vijay Dev
e1099eb4fd Revert "Update guide to use Ruby 1.9 hash syntax"
This reverts commit 50a9de514f.

Reason: Let's keep the guides at 1.8 syntax
2011-11-13 21:50:18 +05:30
José Valim
2591cc6692 Merge pull request #3617 from indirect/remote_ip
refactor RemoteIp middleware
2011-11-13 04:53:51 -08:00
Jason Noble
50a9de514f Update guide to use Ruby 1.9 hash syntax 2011-11-13 03:15:56 -07:00
Jason Noble
a3156ac0f2 Add output for add_index command 2011-11-13 03:15:22 -07:00
Jason Noble
0774f22941 Convert tables to table format 2011-11-13 03:13:58 -07:00
Jason Noble
c0ee497436 Grammar change 2011-11-13 03:12:13 -07:00
Noé Froidevaux
bf6efa8d9c Fix pull request #3609 2011-11-13 11:03:22 +01:00
Jason Noble
5e83491e97 Be explicit on where the show.html.erb is located 2011-11-13 01:40:28 -07:00
Jason Noble
3e3872b598 Make the guide more friendly
- Changed Rails 3.0 to 3.0+
2011-11-13 01:35:08 -07:00
Jason Noble
9b96f7414e Be explicit about changing code 2011-11-13 01:33:29 -07:00
Jason Noble
cb552f807e p.errors.full_messages is a little more human readable 2011-11-13 01:32:26 -07:00