[Rails-core] [patch] fix console --sandbox

2008-10-08 Thread Matt Jones
Ticket at #1194 As first described on Rails talk, script/console -s gives the error: .../vendor/rails/activerecord/lib/active_record/base.rb:1824:in `method_missing':NoMethodError: undefined method `increment_open_transactions' for ActiveRecord::Base:Class on Edge. I'll also add that it does

[Rails-core] Re: config.gem problem with hpricot (and others?) on edge

2008-10-20 Thread Matt jones
After unpacking a gem that uses native extensions, you need to do rake gems:build to actually compile them. --Matt --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group,

[Rails-core] Better documentation for passing extra parameters to routes

2008-11-07 Thread Matt Jones
=> {:type => 'archive'} end Both /library/comments and /archive/comments will map to CommentsController, so the :type will tell the two apart. (Note that plural resources get a (resource)_id value, but singular resources do not.) -- The syntax above for named routes is

[Rails-core] Running ActiveRecord unit tests

2008-11-13 Thread Matt Jones
e fixtures aren't being loaded - what to do? Thanks, --Matt Jones --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@goog

[Rails-core] has_one :through with decorated join model saves incorrectly

2008-11-14 Thread Matt Jones
I've run into a problem with has_one :through and additional attributes on the 'through' model. Tests and further description at: http://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/1376 Thanks, --Matt Jones --- Ticket summary: The attached patch is severa

[Rails-core] Test::Unit::TestCase refactoring

2008-11-17 Thread Matt Jones
I noted that in b0ee1bdf2650d7a8380d4e9be58bba8d9c5bd40e and related commits that the extensions to TestCase are getting pulled out; what's the correct thing to put into test/test_helper.rb? --Matt Jones --~--~-~--~~~---~--~~ You received this me

[Rails-core] Re: Test::Unit::TestCase refactoring

2008-11-17 Thread Matt Jones
Are you sure? When I changed that (in test/test_helper.rb), none of the test methods ran, and I don't see any activity in the log. On Nov 17, 2008, at 1:41 PM, Jeremy Kemper wrote: > > On Mon, Nov 17, 2008 at 10:31 AM, Matt Jones <[EMAIL PROTECTED]> > wrote: &

[Rails-core] Re: Test::Unit::TestCase refactoring

2008-11-17 Thread Matt Jones
I have edge frozen from around five days ago and I > went through and replaced all Test::Unit::TestCase instances in my > test/ directory and all my tests still pass. > > On Nov 17, 2008, at 11:31 AM, Matt Jones wrote: > >> >> Are you sure? When I changed that (in test/

[Rails-core] Re: Test::Unit::TestCase refactoring

2008-11-17 Thread Matt Jones
The relevant line (from railties test_help.rb) was deleted in commit 582aa2ead58eacffca13e7efe94235958ee4db1b on November 7 - should that be put back? --Matt On Nov 17, 2008, at 4:39 PM, Jeremy Kemper wrote: > > On Mon, Nov 17, 2008 at 1:26 PM, Matt Jones <[EMAIL PROTECTED]> wro

[Rails-core] Re: can't run: rake gems:install if application.rb depends on initializers [REPRODUCED]

2008-11-24 Thread Matt Jones
The problem with loading initializers is that they are likely to try to use the configured gems (ie, to set options, etc.). So loading them is going to cause more problems than it solves. FWIW, this problem goes away on edge - http://github.com/rails/rails/commit/a026b4c983681b71d876ea37958c3

[Rails-core] Re: can't run: rake gems:install if application.rb depends on initializers [REPRODUCED]

2008-11-24 Thread Matt Jones
uirements) > end > Oops - this bit actually *is* a bug. It's a short patch; I'll put it up on Lighthouse tonight with a test case. --Matt Jones --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

[Rails-core] Re: can't run: rake gems:install if application.rb depends on initializers [REPRODUCED]

2008-11-24 Thread Matt Jones
Patch is on lighthouse and includes a test for this case: http://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/1464 (patch against 2-2-stable branch) --Matt Jones On Nov 24, 2008, at 2:08 PM, Kenneth Kalmer wrote: > > > $ rake gems > (in /home/kenneth/work/tmp/rails

[Rails-core] Git repos in vendor/gems

2008-11-24 Thread Matt Jones
git clone git://github.com/giraffesoft/attribute_fu.git vendor/gems/ attribute_fu My first thought was that this might be very useful for gem developers... It would be straightforward to implement, but does it sound useful? Thanks, --Matt Jones

[Rails-core] preloading has_one :through on a belongs_to

2008-12-02 Thread Matt Jones
I ran across a small bug in the preloading code for has_one :through - see http://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/1507 for more details. +1s and/or feedback for the patch (against 2-2-stable) appreciated. --Matt Jones [EMAIL PROTECTED

[Rails-core] Gem plugins and autoloading broken

2008-12-07 Thread Matt Jones
acceptable, it should be documented. Alternatively, it should be fixed (sample code in the ticket). I'd be glad to put together a patch, but how would one write a test for this? Thanks, --Matt Jones [EMAIL PROTECTED] --~--~-~--~~~---~--~~ You received this message

[Rails-core] Re: HABTM's select clause

2008-12-27 Thread Matt Jones
while now, though. What attributes are "leaking" in your app? And how do you access them otherwise? --Matt Jones On Dec 27, 2008, at 6:49 AM, Frederick Cheung wrote: > > Is there any reason why HABTM default select clause is select * > from ... rather than select table_name.

[Rails-core] Re: after_create bug or am I missing something?

2009-01-11 Thread Matt Jones
add_multiple_associated_save_callbacks (in association.rb) is trying to save again. --Matt Jones On Jan 10, 2009, at 11:24 PM, edgarjs wrote: > > Hi, > > I'm currently building an app that has these models: > > class Project < ActiveRecord::Base > has_many :collabs

[Rails-core] Re: eliminate has_many through redundancy???

2009-01-12 Thread Matt Jones
:through either a has_many or a belongs_to, so your example would need to be: class User < ActiveRecord::Base has_many :groups, :through => { :has_many => :memberships, :dependent => :destroy } end At which point it starts to look like a duplication of the original code, only

[Rails-core] Choice vs. DRY - any way to reconcile?

2009-01-14 Thread Matt Jones
aining a multitude of nearly- identical codebases. --Matt Jones --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegro

[Rails-core] Re: Choice vs. DRY - any way to reconcile?

2009-01-15 Thread Matt Jones
ber of projects that have effectively been using ActiveRecord *as* the ORM of the ORM; ActiveCouch comes to mind (maps CouchDB calls to AR). --Matt Jones On Jan 15, 2009, at 12:09 PM, Ted Han wrote: > Or... we could wait to see what happens with ActiveORM, which seems to > have been

[Rails-core] Re: Choice vs. DRY - any way to reconcile?

2009-01-18 Thread Matt Jones
o > interesting improvements. > I totally agree - obviously a plugin that's adding to and/or extending ActiveRecord won't be independent. But it should be possible for a plugin to add most run-of-the mill stuff (validations, basic associations, ca

[Rails-core] Re: Is there an "before_commit" hook somewhere in Rails? after_save does not help (example code attached)

2009-01-24 Thread Matt Jones
to wrap all the changes. Then, either use an after_save on Book, or just call a method directly to validate the combination. You'll want to use save! and friends within the block, and catch exceptions (ActiveRecord::RecordInvalid and ActiveRecord::RecordNotSaved) to display errors. --Ma

[Rails-core] Re: Is there an "before_commit" hook somewhere in Rails? after_save does not help (example code attached)

2009-01-25 Thread Matt Jones
In your previous examples, the validation was getting called twice because you *defined* it twice; once in Allocation and once in Book. The preferred idiom in Rails is to define it once, and be careful how you use the objects. Since your rule won't allow Allocations or Books to be updated in

[Rails-core] Tiny bug in ActionMailer

2009-02-01 Thread Matt Jones
ng the SMTP MAIL FROM command. The needed change is 5 characters on a single line. Anyone else run into this? Surely I'm not the only one delivering mail via SMTP and using Return-Path... Would be great to get this into 2.3 final --Matt Jones --~--~-~--~~~---~--~--

[Rails-core] Re: Tiny bug in ActionMailer

2009-02-02 Thread Matt Jones
t should also be noted that TMail performs an equivalent process on 'from' headers already to produce mail.from (the other possible source of the header in the current code). --Matt Jones On Feb 2, 2009, at 7:41 AM, Chris Cruft wrote: > > Matt, > I've seen this behavior

[Rails-core] Re: Tiny bug in ActionMailer

2009-02-04 Thread Matt Jones
I've put a patch up - can somebody take a look at it? I'd like to have this working in 2.3... --Matt Jones On Feb 2, 2009, at 7:41 AM, Chris Cruft wrote: > > Matt, > I've seen this behavior and wondered if that behavior was legit. But > it didn't seem to

[Rails-core] Review request: Small patch for options_for_select

2009-02-16 Thread Matt Jones
t;, [ ... other stuff ...]] Then it will turn into an optgroup tag, with the given label. The "other stuff" will be the contents of the optgroup. This is a little different than grouped_options_for_select, as this allows mixing optgroups and bare option tag

[Rails-core] Fix to gems:install on JRuby

2009-03-12 Thread Matt Jones
s users is particularly important - does "jruby -S gem" work for that case? Thanks! --Matt Jones --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group,

[Rails-core] Re: ActiveRecord::Base#saved_record?

2009-03-18 Thread Matt Jones
he design... The cases in the ticket don't help - the first doesn't explain why, and the second doesn't make any sense. Records created by find_or_create *have* ID values... What can you do with just_created? that can't/shouldn't be done in an after_create callback

[Rails-core] Re: sanitize_to_id in FormTagHelper#text_area_tag patch review request

2009-04-14 Thread Matt Jones
Marked that ticket as a duplicate of #1703 (https://rails.lighthouseapp.com/projects/8994/tickets/1703 ). Can somebody from core take a look at 1703? It seems like a straightforward patch... --Matt Jones On Apr 14, 2009, at 7:06 PM, Dennis Krupenik wrote: > > hi. i'd be very

[Rails-core] Re: default_scoping gets set to nil in development mode

2009-05-10 Thread Matt Jones
inherited callback? I ran into a similar issue a few months ago with rubyist_aasm, which was overriding inherited without calling super. Broke AR timestamps, and a few other things related to inherited_attributes. --Matt Jones On Mar 26, 2009, at 4:03 PM, Ryan Angilly wrote: > In an eq

[Rails-core] Re: Finding the loaded plugins?

2009-05-20 Thread Matt Jones
For gems, your best bet is to iterate over Gem.loaded_specs. That should return everything that's been loaded. You'll need to look for a rails/init.rb file to tell if it's a plugin. --Matt Jones On May 20, 2009, at 11:08 AM, Michael Schuerig wrote: > > On Wednesda

[Rails-core] Re: redesigning mass attribute assignment (activerecord 3.0?)

2009-05-23 Thread Matt Jones
to mention the maintenance headache when adding a new field... --Matt Jones On May 24, 2009, at 12:16 AM, cainlevy wrote: > > Ok, primary ticket: > https://rails.lighthouseapp.com/projects/8994/tickets/2704-allow-calltime-list-of-allowed-attributes-for-mass-assignment > > And

[Rails-core] Re: redesigning mass attribute assignment (activerecord 3.0?)

2009-05-26 Thread Matt Jones
a, "no, really, you can mass-assign these attributes just this once" parameter. That would still allow regular code to work correctly while permitting the context-sensitive stuff you're looking for. --Matt Jones --~--~-~--~~~---~--~~ Yo

[Rails-core] Re: Lighthouse query for what's remaining in 2.3.3?

2009-06-06 Thread Matt Jones
7;t ever worked right before... :) Finally, on a thoroughly *unrelated* note, the patch from #1703 would be nice, if only to stop it being reported over and over. There have been quite a few duplicates of that ticket. --Matt Jones --~--~-~--~~~---~--~~ You received

[Rails-core] Re: Multiple vendor/gem paths

2009-06-11 Thread Matt Jones
s, for instance. Some gems also may need to be loaded before Rails is fully loaded; for example, when using an unbundled copy of tzinfo. > And were there any other plans to re-think the gem code (ie at times > like during search of gem dependancies at startup, etc) ? > Thoughts a

[Rails-core] Re: Approaches to WebDav/CalDav on Rails, today and tomorrow.

2009-06-14 Thread Matt Jones
see this article for an example: http://rails.learnhub.com/lesson/2318-dealing-with-microsoft-office-protocol-discovery-in-rails I used this after about the tenth exception notifier message showed up in my mailbox on a Rails 2.2.2 app. --Matt Jones --~--~-~--~~~---~--~~ Yo

[Rails-core] Re: Rack freezing

2009-07-21 Thread Matt Jones
rver infrastructure. To give a different example, most people would agree that freezing Passenger wouldn't make a lot of sense. So the issue of bundling Rack may still need some discussion. --Matt Jones On Jul 21, 2009, at 7:57 PM, Will Bryant wrote: > > Hi guys, > > I notice

[Rails-core] Re: Rack freezing

2009-07-22 Thread Matt Jones
this will blow up unless Rack is installed at the system level. So encouraging users to freeze Rack will result in apps that break in some environments but not others (even 'smart-lv2' vs 'smart' spawning). --Matt Jones --~--~-~--~~~---~--~~

[Rails-core] Default_scope and :conditions

2009-07-25 Thread Matt Jones
hread/43cc596a2d62f07b Lighthouse ticket: https://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/2953 Can somebody more knowledgeable about named_scope and friends take a look? Thanks, --Matt Jones --~--~-~--~~~---~--~~ You received this message because

[Rails-core] Re: Default_scope and :conditions

2009-07-27 Thread Matt Jones
s that *would* allow this are unworkable because of the early conversion to string conditions. I'll also add that I can't wait to see how the ARel stuff is going, as that would help make this a lot easier... --Matt Jones --~--~-~--~~~---~--~~ You receiv

[Rails-core] Re: Question about Rails 2.x behavior

2009-08-08 Thread Matt Jones
.erb templates - there are still a few of those in the test suite, and I remember it was a headache when sorting out the 'JS responses get wrapped in HTML layouts' mess. --Matt Jones --~--~-~--~~~---~--~~ You received this message because

[Rails-core] Re: Non JavaScript dependent scaffolding solution for record deletion

2009-08-10 Thread Matt Jones
deprecation notice). If > not - then -1 :) I'd certainly hope there's not a deprecation notice - the 'DELETE / items/1/delete' is distinctly un-RESTful. The HTTP verb is sufficient - do we really want to be POSTing to /items/create and PUTting to / items/1/update (

[Rails-core] Couple questions re: database indexes

2009-10-14 Thread Matt Jones
that covers some of the popular ones... Thoughts on these issues are appreciated. --Matt Jones --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send em

[Rails-core] Re: Couple questions re: database indexes

2009-10-14 Thread Matt Jones
to the best of my knowledge. Postgres supports an 'ALTER INDEX' statement, though. Maybe the best way would be to have a generically valid way (drop old / add new) in AbstractAdapter and override as needed? Looks like I've got a busy weekend of reading DBMS manuals ahead of

[Rails-core] Database limits

2009-10-20 Thread Matt Jones
On Oct 15, 2009, at 1:38 AM, Matt Jones wrote: > > On Oct 14, 2009, at 6:30 PM, Michael Koziarski wrote: > >> >>> First off, is there a programmatic way to get the DB's limits for >>> index name length? It's easy enough to look them up for a particul

[Rails-core] Public API documentation?

2009-10-20 Thread Matt Jones
actual content. Any info is appreciated, as Hobo is one of the plugins (like RSpec and friends) that's notorious for hacking into the guts of Rails, only to be broken on every point release. It'd be great to finally be hooking into the "legit&qu

[Rails-core] Variation in behavior between directly calling a method and using method('name').call ?

2009-10-29 Thread Matt Jones
B makes it work, but I can't figure out why that's needed for only one of the two forms. Any help is appreciated. --Matt Jones --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core"

[Rails-core] Re: Rails XSS protection and helpers

2009-10-31 Thread Matt Jones
x27;d recommend that you create a new ticket for this - I know it's a tiny patch (add some parens), but it helps to have a separate ticket to track status on. --Matt Jones --~--~-~--~~~---~--~~ You received this message because you are subscribed to th

[Rails-core] Re: Couple questions re: database indexes

2009-11-01 Thread Matt Jones
ood idea, check for name collision and names > which exceed the adapter limit would let us give relatively nice error > messages. > >> Thoughts on these issues are appreciated. > > All three sound like nice little patches, look forward to you >

[Rails-core] Patch for review: make :delete_all on has_many with :primary_key not delete unrelated records

2009-11-03 Thread Matt Jones
that declared in the association. Could cause data loss in some circumstances. Patch is tiny - one line + some support functions, and includes a test. Thanks! --Matt Jones --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google G

[Rails-core] Re: Bundler not working on windows for gems that are extensions

2009-11-05 Thread Matt Jones
gi-bin/scat.rb/ruby/ruby-talk/104505 http://rubyforge.org/tracker/index.php?func=detail&aid=17911&group_id=426&atid=1700 Apparently, there's a long-standing difficulty with mkmf and Windows paths that contain spaces. Can you try again from a directory without sp

[Rails-core] Re: PStore test

2009-11-05 Thread Matt Jones
e doc for PStore: http://www.ruby-doc.org/stdlib/libdoc/pstore/rdoc/classes/PStore.html The default session store used to be CGI::Session::PStore; I'm assuming this is testing that AR objects can be stored there. Looks like it went away in the transiti

[Rails-core] Re: Model.find_by_attribute only called the first time

2009-11-09 Thread Matt Jones
Ultimately it isn't important to my app, but it would be nice when me > or users forget trailing .s > You might also want to think about doing this in a before_filter; cleaning trailing spaces off of request parameters feels pretty controller-y to me. --Matt Jones --~--~-~

[Rails-core] Re: Preserving has_many :through ids assignment order

2009-11-10 Thread Matt Jones
Does anyone think this would belong in core or should I just keep it > as a special case in my model? What's the use case for this? The objects aren't going to come out of the DB in order the next time you load the object unless you're putting them in order with options on the

[Rails-core] Re: Preserving has_many :through ids assignment order

2009-11-11 Thread Matt Jones
t doing that, as all that the find() call is doing is generating a query like: SELECT * FROM table_name WHERE id IN (x,y,z,etc) If those records aren't coming back in the order you expect, that's not Rails's fault... --Matt Jones --~--~-~--~~~---~--~

[Rails-core] Re: Preserving has_many :through ids assignment order

2009-11-12 Thread Matt Jones
For this to make sense as a Rails patch, there's got to be a reason why this ordering should be preserved. What's the difference between adding the records in the [5,8,3] order vs. some other order? --Matt JOnes --~--~-~--~~~---~--~~ You recei

Re: [Rails-core] Decrypt a admin password (with salt)

2009-11-18 Thread Matt Jones
ve access to the DB is if you're a hacker. Second, this isn't a list for this kind of question - that's what rails-talk is for. --Matt Jones -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this grou

Re: [Rails-core] Dirty Associations

2009-11-18 Thread Matt Jones
o you're OK using the dirty tracking in callbacks / observers. --Matt Jones On Nov 18, 2009, at 4:47 PM, Chris O'Meara wrote: > Hello, > > I found an area where I don't totally understand the behavior of the > dirty tracking feature in Active Record. It appears as though

Re: [Rails-core] What does rails_xss in Rails 2.3.5 mean for plugin/gem authors?

2009-12-02 Thread Matt Jones
loaded, if present. So in your case, it might work to load normally on require and then mark the helpers as safe in rails/ init.rb, if rails_xss is loaded. --Matt Jones -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To p

Re: [Rails-core] test "this is a test" do vs def this_is_a_test

2009-12-18 Thread Matt Jones
r / setup from another test, so the test method was stomping on an identically named test... I'd recommend that you double-check the declarations in users_test.rb and forums_test.rb, as something weird is going on... --Matt Jones -- You received this message because you are subscri

Undefining object_id (was Re: [Rails-core] Re: proposing Object#nonblank? (analogous to Ruby's Numeric#nonzero?))

2009-12-28 Thread Matt Jones
he above ticket) that AssociationProxy and Scope carefully avoid undefining object_id, but is that solely because of the warning? --Matt Jones -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send emai

[Rails-core] Tiny patch for 2-3-stable: require the correct Rack version in the gemspec

2009-12-28 Thread Matt Jones
fails when the server starts. Patch here: https://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/3558 Sorry to bug the list about a tiny (one character!) issue, but it didn't appear to be going anywhere on LH. --Matt Jones -- You received this message because you are subscri

Re: [Rails-core] Help needed with failed tests while running Rails test suite

2009-12-31 Thread Matt Jones
with someone else? > Any chance this is related? http://groups.google.com/group/rubyonrails-talk/browse_frm/thread/5379ac328f6d713f I've got no idea what the DST situation in Brazil is, but that thread jumped out as being possibly related. --Matt Jones -- You received this message

Re: [Rails-core] help - error loading....

2010-01-12 Thread Matt Jones
x27;s specifying an explicit dependency on an earlier version of Rails, and we aren't correctly stubbing @loaded_stacks for the vendor/rails versions. --Matt Jones -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. T

Re: [Rails-core] help - error loading....

2010-01-12 Thread Matt Jones
running from vendor/rails. See these tickets for more details: https://rails.lighthouseapp.com/projects/8994/tickets/1107 https://rails.lighthouseapp.com/projects/8994/tickets/1123 Hope this helps. --Matt Jones -- You received this message because you are subscribed to the Google Groups &qu

Re: [Rails-core] help - error loading....

2010-01-12 Thread Matt Jones
#x27;d say you're pretty much stuck. The other option would be to zap the old vendor/rails and try running against 2.3.5. I suspect the latter is going to cause some pretty serious problems if the app is 2.1.x-era. --Matt JOnes -- You received this message because you are subscribed to th

Re: [Rails-core] Re: Does rails ever automatically bring in a gem?

2010-01-12 Thread Matt Jones
So I'm guessing the working machine has an earlier patchlevel of Ruby that triggers the fix, and the not-working one obviously has a later version that doesn't. The results of 'ruby -v' on both should show a difference... --Matt Jones -- You received this message

Re: [Rails-core] Re: Suggestion to rename match() to connect()

2010-02-23 Thread Matt Jones
ute in "chunks"; for example, see the last example of this tutorial: http://merbunity.com/tutorials/12 Note that the Merb syntax wasn't 100% retained (.to has become :to, and the block argument has vanished), but it's much closer. --Matt Jones -- You received this m

Re: [Rails-core] AssociationProxy class decoupling suggestion

2010-02-25 Thread Matt Jones
elf' will be the array end result end But I'm not really sure why writing @board.users.owner(card) is in any way preferable to just defining 'owner' on Board - @board.owner(card)... --Matt Jones -- You received this message because you are subscribed to the Google Gro

[Rails-core] 2.3.x: Aliasing tables in :joins

2010-03-23 Thread Matt Jones
? I haven't spent enough time with Rails 3 to know - does ARel handle this automatically? Thanks! --Matt Jones -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-c...@googlegroups.com.

Re: [Rails-core] Bundler caching issues when updating gem locally

2010-04-19 Thread Matt Jones
On Apr 19, 2010, at 6:24 PM, Kristian Mandrup wrote: If I have a gem locally that I change without updating the version number the bundler never seems to notice. Don't do this. Seriously. Long-term, it's a one-way ticket to dependency hell. --Matt Jones -- You received th

Re: [Rails-core] Re: In development mode not all types are included in the query related to type

2010-05-12 Thread Matt Jones
in Manager Candidate).each { |c| c.constantize } As I can never remember which one of require / require_dependency sometimes jams up (or used to back in the day) the autoloader. --Matt Jones -- You received this message because you are subscribed to the Google Groups "Ruby on R

Re: [Rails-core] taking the Rails API to a next level

2010-06-17 Thread Matt Jones
m/tablatom/rubydoctest --Matt Jones -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-c...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-core+unsubscr

Re: [Rails-core] Re: Creating non standard primary key a confusing and does not work with primary key of type 'string'

2010-07-08 Thread Matt Jones
st to muddle through despite somewhat contradictory options. --Matt Jones -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-c...@googlegroups.com. To unsubscribe from thi

Re: [Rails-core] helping with rails 3 release

2010-07-15 Thread Matt Jones
> like the high priority stuff is mostly fixed. Since nobody else has brought it up, one way you can help is to verify that plugins work on 3.0, fix any issues that arise, and (most importantly) report any pain points or bugs that you find in 3.0 itself. --Matt Jones -- You received

[Rails-core] Spam on Lighthouse

2010-07-19 Thread Matt Jones
ent but leave active, Google-followable links live on the page. Once a comment is marked as spam, it doesn't appear to be possible to delete it... Any thoughts on the best way to deal with this? I wish LH had a "report this *user* as spam" button... --Matt Jones -- You received this

Re: [Rails-core] instance_exec routes -> form helpers

2010-07-19 Thread Matt Jones
m with the instance_exec version is that it's pretty ugly if you actually need to pass the helper object into, for instance, a partial. Not really relevant for the router, but *very* relevant for form builders... --Matt Jones -- You received this message because you are subscribed to the Goog

Re: [Rails-core] Rails validations and concurrency

2010-10-31 Thread Matt Jones
other folks have. :) https://rails.lighthouseapp.com/projects/8994/tickets/3486 --Matt Jones -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-c...@googlegroups.com. To unsub

Re: [Rails-core] I18n, validations and symbols

2010-11-02 Thread Matt Jones
*are* times when using symbols is a bad idea; HashWithIndifferentAccess was specifically created (and keyed with strings rather than symbols) to block attacks that try to overflow memory with tons of unique parameter names. BTW, I've also heard some chatter about 1.9 doing GC on Symbols

Re: [Rails-core] class_attribute is too dangerous, here's an alternative

2011-01-21 Thread Matt Jones
ot;z"]} Object#clone solves the problems caused when you add a key to hash b in this example, but it doesn't completely separate the objects. This code does: totally_cloned = Marshal.load(Marshal.dump(source)) but that's fairly inefficient and fails disastrously if an object that can

Re: [Rails-core] Possible bug with chained where methods on 3.0.4

2011-02-16 Thread Matt Jones
al, they're just in different scopes. On the other hand, isn't this sort of issue exactly why Arel has operators to combine scopes? The chained notation is alright for some things, but it's never going to be sufficient to create arbitrary SQL without a lot of fussing. --Matt Jones

Re: [Rails-core] Associations are not consistent in honoring :dependent => destroy (db is fill with orphaned objects)

2011-02-20 Thread Matt Jones
the object is destroyed. #3, on the other hand, means that deleting a user will delete every Project that user was assigned to, as will doing 'user.projects = []'... --Matt Jones -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. T

Re: [Rails-core] Patch to MemCacheStore for Ruby 1.9.2

2011-03-05 Thread Matt Jones
gs from tickets, so there's a restriction on newish users changing tags. I've tagged the ticket as 'patch'. What version of Rails does the patch apply to? It doesn't look *particularly* sensitive to version (since it's only touching two files) but it will help

Re: [Rails-core] [patch] Enumerable#uniq?

2011-03-16 Thread Matt Jones
e_models.uniq? { |x| x.created_at.month } to see if an array of models were all created on different months. That said, I'm not clear on what this would actually be useful for outside of toy examples... --Matt Jones -- You received this message because you are subscribed to the Google Gro

Re: [Rails-core] ActiveResource: prefix attributes that are mass assigned are not readable - Stale ?

2011-03-18 Thread Matt Jones
#x27;t know how to do it) ? > Any help appreciated. Ticket reopened. --Matt Jones -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com. To unsubscribe from this

Re: [Rails-core] Problem in saving fields to database from csv using fastercsv

2011-03-23 Thread Matt Jones
> Here I am using fastercsv to process my csv and paperclip to upload. > > I am able to process file read content and able to fill up the field too here > is the processing code: > > def proc_csv > @import = Import.find(params[:id]) > @lines = parse_csv_file(@impo

Re: [Rails-core] Date#- => Rational ?

2011-04-06 Thread Matt Jones
s" and DateTimes can mix fractions in: require 'date' d = Date.civil(2011,4,6) d2 = DateTime.civil(2011,4,6,12,0,0) d2 - d # returns Rational(1,2) - in other words, "half a day" since the docs say Date objects are considered to have a time of midnight --Matt Jones --

[Rails-core] ActionView::OutputBuffer - append= and << are not QUITE identical

2011-10-09 Thread Matt Jones
passed in (Ruby's standard behavior for assignments in general). The return value of append= is silently dropped on the floor. Note that this will never be observed by users of the built-in ERB template parser, since it automatically grabs @output_buffer in the Erubis postamble. --Matt Jo

[Rails-core] Pull request: fix SQL generation bug in Postgres / Oracle

2011-12-27 Thread Matt jones
7;s the design motivation behind keeping the values passed to reorder separate from order? As a side-effect of that implementation, this code: SomeModel.order('foo ASC').reorder('bar DESC').order('baz ASC') does not (as might be expected) sort the returned record by

Re: [Rails-core] Pull request: fix SQL generation bug in Postgres / Oracle

2011-12-28 Thread Matt Jones
On Dec 28, 2011, at 5:55 AM, Jon Leighton wrote: > On 27/12/11 14:32, Matt jones wrote: >> https://github.com/rails/rails/pull/4082 > > I've commented on the PR. > Updated PR against master: https://github.com/rails/rails/pull/4216 >> On a related note, the c

Re: [Rails-core] Pull request: fix SQL generation bug in Postgres / Oracle

2012-01-03 Thread Matt Jones
ation's order_values attribute is now always the ordering the final relation will use. --Matt Jones PS: I also noticed a tangentially related issue - reverse_order has a similar sort of issue with late-application; for instance, this: SomeModel.order('foo ASC').reverse_order.

[Rails-core] Interoperating ActiveResource and ActionController::Responder

2012-02-04 Thread Matt Jones
source, so it shouldn't break in any application that was working before. https://github.com/rails/rails/pull/4881 Would appreciate any feedback - it would be nice for the framework to actually work with its own API endpoints... Thanks, --Matt Jones -- You received this message

[Rails-core] Using JSON template builders with respond_with

2012-02-13 Thread Matt Jones
instead a "201 Created". Is there a clean way to handle this? I like the idea of avoiding hackery like including view helpers in models for as_json, but the response code changes mean that I'm back to writing out respond_tos manually. Thanks, --Matt Jones -- You receive

Re: [Rails-core] [ANN] Rails 3.2.2.rc1, 3.1.4.rc1, and 3.0.12.rc1 have been released!

2012-02-23 Thread Matt Jones
that breaks your app! Please use this opportunity! :-D It would be great to get this patch in: https://github.com/rails/rails/pull/4881 Does it count as a regression if ARes has *never* been able to parse the default Responder's error messages? --Matt Jones -- You received this message be

Re: [Rails-core] ActiveResource 3.2.1 : ActiveResource::Formats::JsonFormat.decode and ActiveResource::Base.include_root_in_json

2012-03-03 Thread Matt Jones
hough the patch in that instance wouldn't fix this bug, as the detection heuristic will guess that image_page is a root element to be removed. It appears that the problem is that remove_root doesn't have any awareness of the context in which it's operating - really, we should onl

Re: [Rails-core] Scaffold Generator Woes

2012-03-08 Thread Matt Jones
s that can't choose an alternative. To me, it seems easier to imagine the counterfactual: imagine Rails *without* a similar generator, and then imagine the responses to a proposed generator that would automatically create reasonably clean, idiomatic code that a new developer could quickly see result

Re: [Rails-core] On handling staging servers

2012-04-14 Thread Matt Jones
example of various categories of environment, each of which requires a particular clump of settings. The log_level issue does seem relevant, though - maybe the conditional could be inverted to "not development or test"? --Matt Jones -- You received this message because you are

Re: [Rails-core] Re: Support the ability to write properties within models

2012-05-10 Thread Matt Jones
factoring, now that it's been in production use for a couple years. Anybody who's interested in discussing *that* further is welcome to join us over in the hobo-dev Google Group. Thanks, --Matt Jones -- You received this message because you are subscribed to the Google Groups &qu

Re: [Rails-core] Attribute query methods and semantics

2012-06-01 Thread Matt Jones
true), and using present? instead requires a Proc. Not certain if this is a sufficient argument for the existence of the ? suffix, but worth thinking about. --Matt Jones -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To

  1   2   >