[Rails-core] Re: [Feature][ActiveStorage] Option to delete file on cloud storage service later

2018-04-18 Thread Tim Down
Actually it turns out that S3's lifecycle policy feature covers my needs so I'm no longer considering this. It looks crazy anyway. Tim On Wednesday, 18 April 2018 17:09:48 UTC+1, Tim Down wrote: > > I would like an option in Active Storage to delay the deletion of a file

[Rails-core] [Feature][ActiveStorage] Option to delete file on cloud storage service later

2018-04-18 Thread Tim Down
take me longer than I'd like. Before I start, is this a really stupid idea? Tim -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrail

[Rails-core] [Feature] Numeric#milliseconds to complement #minutes, #hours, #days, etc.

2018-04-18 Thread Tim Rogers
ActiveSupport monkeypatches `Numeric` to add time-related functionality (see activesupport/lib/active_support/core_ext/numeric/time.rb ), giving you some nice sugar for working with time, e.g.:

[Rails-core] Option not to line up column attributes in schema.rb

2016-07-04 Thread Tim Petricola
schema.rb git diff are often harder to read as adding a column or argument could add/remove whitespace for other columns definitions. Let's say I have a `users` table with a `first_name` column: create_table "users", force: :cascade do |t| t.string "first_name", null: false end If I add anot

[Rails-core] Using "rescue_from Exception" to render a 500 page with the application layout will not catch all Exceptions

2014-10-08 Thread Tim Raymond
I'm not really sure whether this is a doc bug or a regular bug, so I figured I would open a thread here to figure out which. If you use `rescue_from Exception` to render a dynamic 500 page with your application layout, and the exception was triggered from the application layout to begin with, i

Re: [Rails-core] Float::INFINITY ranges in where() clause

2013-02-19 Thread Tim Pope
On Tue, Feb 19, 2013 at 5:27 AM, Aaron Patterson wrote: > On Mon, Feb 18, 2013 at 10:58:05PM -0500, Tim Pope wrote: >> This seems like such an obvious idea that I'm having trouble believing >> I'm the first to think of it. Why not take ranges containing >> Float:

[Rails-core] Float::INFINITY ranges in where() clause

2013-02-18 Thread Tim Pope
This seems like such an obvious idea that I'm having trouble believing I'm the first to think of it. Why not take ranges containing Float::INFINITY and translate them to the appropriate greater than or less than comparisons? Example: class Person scope :voters, -> { where(born_on: (-Float::INFI

[Rails-core] Docrails Git Workflow

2013-01-07 Thread Tim Raymond
m the community. Thanks, Tim -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-core/-/mCWapaXPMHoJ. To post to this group, send email to rubyonrails-

Re: [Rails-core] Should chunked encoding (by Rails) be optional for HTTP streaming?

2012-08-26 Thread Tim Olsen
On Sun, Aug 26, 2012 at 4:01 AM, Michael Schuerig wrote: > On Sunday 26 August 2012, Tim Olsen wrote: > > As for Winstone, I have tried that server and it works with the > > chunked encoding. > > Ouch. I mistakenly thought that Winstone was an embedded variant of >

Re: [Rails-core] Should chunked encoding (by Rails) be optional for HTTP streaming?

2012-08-25 Thread Tim Olsen
d work differently for much larger or smaller > responses. > With that size, I would expect you to see double chunked encoding. Double chunked encoding results in the hex showing through, that is if you're not using a browser such as Chrome which refuses to display a page with two Transfer-

Re: [Rails-core] Should chunked encoding (by Rails) be optional for HTTP streaming?

2012-08-25 Thread Tim Olsen
er a certain size. I've filed an issue with more details at https://github.com/jruby/jruby-rack/issues/117 . How large are your responses? I've only tried so far to get one of our streamed pages to work in a jruby setup. It's response is 68,019 bytes. Tim -- You received this

Re: [Rails-core] Should chunked encoding (by Rails) be optional for HTTP streaming?

2012-08-24 Thread Tim Olsen
On Friday, August 24, 2012 6:58:08 PM UTC-4, Aaron Patterson wrote: > > On Fri, Aug 24, 2012 at 06:44:02AM -0700, Tim Olsen wrote: > > I have encountered a few problems with HTTP streaming which can be > traced > > to Rails always doing the chunked encoding itself: >

[Rails-core] Should chunked encoding (by Rails) be optional for HTTP streaming?

2012-08-24 Thread Tim Olsen
the server is capable of doing the chunked encoding. This could be controlled by a configuration option. As an intermediate step towards moving it to a Rack middleware, chunked encoding could first be made optional. This would at least solve the JRuby / Tomcat issue. Thoughts? -Tim -- Yo

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

2012-05-08 Thread Tim Shaffer
Seems like unnecessary duplication if you have to specify the field in a migration as well as in the model itself. What's the point of having to specify the field on the model if it's already in the table? Unless there is some other benefit that I am not seeing right away. -- You received thi

Re: [Rails-core] Unobtrusive Image Mouseover

2011-10-17 Thread Tim Shaffer
Thanks for the input. That's exactly what I needed to know. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-core/-/t4LaRYPA-VcJ. To post to this group,

[Rails-core] Unobtrusive Image Mouseover

2011-10-14 Thread Tim Shaffer
Using the following snippet of code to get an image with a mouseover image: <%= image_tag("button_off.png", :mouseover => "button_on.png", :alt => :button) %> Generates inline JavaScript to do the image swapping like so: It's possible (and very simple) to do the image swapping in an UJS manne

Re: [Rails-core] Re: Patch for #1812 -- allow default_scope to take a proc

2010-10-19 Thread Tim Morgan
This is great, and I wouldn't have seen the possibilities if you hadn't explained it in code! Thanks! -Tim On Tue, Oct 19, 2010 at 5:28 PM, Aaron Patterson wrote: > On Tue, Oct 19, 2010 at 04:16:33PM -0500, Tim Morgan wrote: > > Sure! > > > > Here is

Re: [Rails-core] Re: Patch for #1812 -- allow default_scope to take a proc

2010-10-19 Thread Tim Morgan
ils/commit/e0b73b64c30e81e5b4279ce55dd2b7d65cfae00a> -Tim On Tue, Oct 19, 2010 at 3:35 PM, Aaron Patterson wrote: > On Tue, Oct 19, 2010 at 08:57:02AM -0700, Tim Morgan wrote: > > Sorry I forgot to link to the ticket: > > > https://rails.lighthouseapp.com/projects/8994/tickets

[Rails-core] Re: Patch for #1812 -- allow default_scope to take a proc

2010-10-19 Thread Tim Morgan
here: http://github.com/seven1m/rails -Tim On Oct 19, 9:47 am, Tim Morgan wrote: > Can I get someone to review this very small patch (only 5 lines, plus > tests of course) to allow default_scope to accept a proc? > > It applies to 3-0-stable and to master, and passes tests on bot

[Rails-core] Patch for #1812 -- allow default_scope to take a proc

2010-10-19 Thread Tim Morgan
Can I get someone to review this very small patch (only 5 lines, plus tests of course) to allow default_scope to accept a proc? It applies to 3-0-stable and to master, and passes tests on both branches. -Tim -- You received this message because you are subscribed to the Google Groups "Rub

[Rails-core] Re: Suggestion for Rails partials: associate with a "partial" controller method

2010-03-21 Thread tim
scopes and associations my controllers turn out to be boilerplate most of the time anyway. Cheers Tim On 21 Mrz., 15:44, Nicolás Sanguinetti wrote: > On Sun, Mar 21, 2010 at 7:23 AM, michael.hasenst...@googlemail.com > > > > wrote: > > Hi, > > > I always found one thi

[Rails-core] Patch for ActiveRecord::Base.find mixed array of Strings and Symbols for :joins option

2009-08-31 Thread Tim Assmann
added support for mixed arrays of manueal joins and model associations in ActiveRecord::Base.find's :joins option Right now it is only possible to eather supply Strings with handcoded sql join options or an Array/Hash with References to model associations. But it is not possible for example to sa

[Rails-core] named_scope and loaded associations with :dependent => :destroy

2009-07-27 Thread tim
ads posts u.posts.title_like('term').delete_all deletes *all* posts from u - not just the ones with 'term' in the title. This is because :dependent => :destroy makes the association enumerate the loaded target ignoring the scope. Cheers Tim --~--~-~--~~~---~--

[Rails-core] Re: HasOneThroughAssociation should not be a child of HasManyThroughAssociation

2009-04-23 Thread Tim Connor
Yeah, aren't we supposed to be acolytes of Agile, and iterative improvements? --~--~-~--~~~---~--~~ 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@googlegr

[Rails-core] Re: Addition of 'or' method to String and NilClass in core_ext

2009-01-29 Thread tim
See the discussion on the ticket for a nice lazy evaluation feature using blocks. -Tim On 29 Jan., 13:03, "matthewrudyjac...@gmail.com" wrote: > On Jan 29, 11:56 am, stephen paul suarez wrote: > > > how do you suggest to make it cater for fallbacks that doesn't

[Rails-core] Re: Addition of 'or' method to String and NilClass in core_ext

2009-01-28 Thread tim
The return can be omitted. Tim On 28 Jan., 07:25, Ryan Angilly wrote: > I just found out google groups was bouncing my emails because they were > coming from a different address, so to sum them all up in one: > > I also realized that I do crap like this a lot too: >

[Rails-core] index "unique_schema_migrations" should use table prefix/suffix

2008-12-19 Thread Tim Peters
94/tickets/1543-index-unique_schema_migrations-should-use-table-prefixsuffix Thanks, Tim --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send

[Rails-core] Conventions for structure of translation files

2008-12-14 Thread tim
Hi there, just wanted to give a quick pointer to a discussion on the rails-i18n list. Please skip the first two posts since for some reason two threads got mixed up. http://groups.google.com/group/rails-i18n/browse_thread/thread/9b7572abfb23ac42 Tim

[Rails-core] Improvement to number_to_phone to handle more countries

2008-10-22 Thread Tim Morgan
My app needed a good way to format a phone number for countries other than the US. So I added the "groupings" option to the number_to_phone() helper. I'm not sure if this will allow the helper to accommodate all countries, but it will go quite a way further than it does now. I'd love to get some

[Rails-core] Re: protect_from_forgery(secret) and config.action_controller.session_store

2008-09-02 Thread Tim Haines
This patch (or one like it) also has the side benefit of being able to simplify the generated code for ActionController. The :secret could be uncommented by default, and the comment on the line above could be removed. On Wed, Sep 3, 2008 at 12:29 AM, Tim Haines <[EMAIL PROTECTED]> wrote

[Rails-core] Re: protect_from_forgery(secret) and config.action_controller.session_store

2008-09-02 Thread Tim Haines
I decided to have a go at this tonight. Patch attached at http://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/957 I'm happy to hear any feedback on the patch - as it might have a broader impact than I'm aware of with my limited experience hacking on rails source. Ch

[Rails-core] Re: protect_from_forgery(secret) and config.action_controller.session_store

2008-09-02 Thread Tim Haines
Cheers Koz, I might have a poke around with it over the weekend and see if I can come up with anything useful. Tim. On Tue, Sep 2, 2008 at 7:11 PM, Michael Koziarski <[EMAIL PROTECTED]>wrote: > > > I'm wondering if the secret param should ever be used when using the > c

[Rails-core] protect_from_forgery(secret) and config.action_controller.session_store

2008-09-01 Thread Tim Haines
ing the session store? Cheers, Tim. --~--~-~--~~~---~--~~ 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

[Rails-core] [Patch Review] Improve error messages for assert_select_rjs

2008-08-29 Thread Tim Haines
Another simple patch - fixes the assert_select_rjs failure messages, tests included. http://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/931 Cheers, Tim. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

[Rails-core] [Patch Review] Make TestUploadFile content_type writable

2008-08-27 Thread Tim Haines
Hi there, Writing some controller specs for uploading files this morning I was having problems because TestUploadfile.content_type isn't writable. I've submitted a really simple patch with a tweaked test: http://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/920 Ch

[Rails-core] Re: [Patch for Review] dirty methods on attribute aliases

2008-08-20 Thread Tim Haines
I dropped it into the rails-talk list (not the core list) on Sunday/Monday. Tim. On 8/21/08, Ryan Bigg <[EMAIL PROTECTED]> wrote: > > > Could've sworn I saw a post like this before. > > > > --~--~-~--~~~---~--~~ You recei

[Rails-core] [Patch for Review] dirty methods on attribute aliases

2008-08-20 Thread Tim Haines
alias's -> http://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/812 and it's received a couple of +1's now. Cheers, Tim. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Co

[Rails-core] Re: Documentation issues in Lighthouse

2008-07-17 Thread Tim Haines
On Fri, Jul 18, 2008 at 8:44 AM, Pratik <[EMAIL PROTECTED]> wrote: > > Hey Tim, > > On Thu, Jul 17, 2008 at 9:10 PM, Tim Haines <[EMAIL PROTECTED]> wrote: > > Hi Guys, > > If you need any kind of help in making the patch, you can always hit > me up in #r

[Rails-core] Re: Documentation issues in Lighthouse

2008-07-17 Thread Tim Haines
ally followed Rails core, and maybe that just doesn't happen here. That's about the extent of my caring for now. :-) It comes down to "IMO removing valid issues just because they involve docs is a bad idea". Moving on.. Tim. On Thu, Jul 17, 2008 at 11:46 PM, Clemens &l

[Rails-core] Documentation issues in Lighthouse

2008-07-16 Thread Tim Haines
#x27;t have the resources to submit a patch at the time.. Cheers, Tim. --~--~-~--~~~---~--~~ 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@googlegroup

[Rails-core] Re: Bug in Rails 2.0 when overloading a find_by method?

2008-01-19 Thread Tim Lucas
and it stemmed from: http://dev.rubyonrails.org/changeset/7510 and: http://dev.rubyonrails.org/ticket/9317 I'd like to see the change rolled back as it makes for a pretty nasty behaving method_missing. -- tim --~--~-~--~~~---~--~~ You received this message because yo

[Rails-core] Broken 2.0.2 gems

2007-12-17 Thread Tim Pope
Hi all, As many have noticed by now, "gem install rails" can't install Rails 2.0.2. There's a ticket with a potential fix that would be great to get some core feedback on. http://dev.rubyonrails.org/ticket/10541 Thanks, Tim --~--~-~--~~~---~-

[Rails-core] Documenting configuration options

2007-12-08 Thread Tim Lucas
the options for solving it here: http://dev.rubyonrails.org/ticket/10424 Run the attachment on the ticket through rdoc to see what I mean: http://dev.rubyonrails.org/attachment/ticket/10424/documenting_cattr_accessors.rb?format=raw -- tim --~--~-~--~~~---~--~~ Yo

[Rails-core] Re: Remove the old school "missing default helper path" warnings

2007-12-06 Thread Tim Lucas
t things I remove in my pistonized copies. Yeah I thought this was the majority use-case these days... but maybe its not? Discussion's on the ticket: http://dev.rubyonrails.org/ticket/10389#comment:3 -- tim --~--~-~--~~~---~--~~ You received this message

[Rails-core] Remove the old school "missing default helper path" warnings

2007-12-06 Thread Tim Lucas
http://dev.rubyonrails.org/ticket/10389 Now we've moved to "helper :all" can we remove the "missing default helper warnings"? Have had plenty of similar grumblings from user groups peeps about it. -- tim --~--~-~--~~~---~--~~

[Rails-core] TestResponse#binary_content() breaks if send_file was called. Verifiers needed

2007-12-05 Thread Tim Olsen
I've patched TestProcess#binary_content() (included in TestResponse) to work if send_file in a test. patch with test case is at http://dev.rubyonrails.org/ticket/8044 Thoughts and +1s are welcome :-) Thanks, Tim --~--~-~--~~~---~--~~ You received this me

[Rails-core] Re: Rails is wrong about 0000-00-00

2007-11-27 Thread Tim Connor
> What's "OP" ? Original Poster - the person who started the thread. --~--~-~--~~~---~--~~ 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

[Rails-core] Re: Rails is wrong about 0000-00-00

2007-11-26 Thread Tim Connor
Do we want to follow MYSQL, or any specific DB provider, practices, over ruby's, though? And/or the standards? (Don't honestly know what ANSI SQL has to say about -00-00). --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

[Rails-core] Re: Rails is wrong about 0000-00-00

2007-11-25 Thread Tim Connor
On Nov 24, 8:53 pm, Greg Willits <[EMAIL PROTECTED]> wrote: > A typical example would be a Date Due field where a valid date = when it > was done, a NULL value = not done yet that we know of, and a -00-00 > value = it has been declared that it never will be done. Reports for > this data must b

[Rails-core] tztime plugin resaving bug w/ fix

2007-11-18 Thread Tim Lucas
Not sure what Jamis is up to, but just in case this fell off the radar: http://dev.rubyonrails.org/ticket/10058 -- tim --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To po

[Rails-core] Re: [ANN] tumblr-0.0.1

2007-11-03 Thread Tim Lucas
On 03/11/2007, at 10:52 AM, Courtenay wrote: > > On 11/2/07, ara.t.howard <[EMAIL PROTECTED]> wrote: >> >> >> NAME >> tumblr >> >> SYNOPSIS >> tumblr (setup|write|read|authenticate|check-vimeo|check-audio) >> [options]+ >> >> DESCRIPTION >> tumblr.rb is a command line utility and library wh

[Rails-core] Re: Migrations w/o down methods irreversible by default

2007-09-22 Thread Tim Lucas
n't, then let it die a quick death. Its a small thing, but it's the small things yakyakyak -- tim --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to

[Rails-core] Re: Migrations w/o down methods irreversible by default

2007-09-22 Thread Tim Lucas
ot actually handled anywhere. You could raise any old error. -- tim --~--~-~--~~~---~--~~ 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-cor

[Rails-core] Migrations w/o down methods irreversible by default

2007-09-22 Thread Tim Lucas
leMigration end end when you could simply do: class DoSomethingNastyToTheDatabase > ActiveRecord::Migration def self.up execute "some nasty database call" end end Attached to the ticket is a patch to implement this, keep backwards compatibility, improve docs and

[Rails-core] Re: Namespacing Models

2007-09-13 Thread Tim Lucas
plugin works :) :) I only mentioned it because the Module::Class table_name convention might be the only part that's slightly illogical (rather than have it similar to camping, module prefixed)... but hey, I don't mind keeping it as-is and having people set table_name to "security_

[Rails-core] Re: Namespacing Models

2007-09-13 Thread Tim Lucas
"security_users", though it irks me that it's the same result as the table_name for a SecurityUser class. -- tim --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" gro

[Rails-core] Re: Hatred towards Nested Polymorphic Paths

2007-08-03 Thread Tim Lucas
ciations proxy, starting from current_user.projects -- tim --~--~-~--~~~---~--~~ 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

[Rails-core] Patching redirect_to(string) to check default_url_options[:protocol] for ssl

2007-07-03 Thread Tim Connor
There are cases where it'd be nice to be able to set the protocol (for ssl) easily, when you don't have access to the X-FORWARDED-PROTO header, such as in Jamis' post http://weblog.jamisbuck.org/2006/10/3/mongrel-ssl-and-apache-1-3 . The current behavior also means ssl_requirement chokes under A

[Rails-core] Re: with_scope should not be protected.

2007-06-18 Thread Tim Lucas
ll the Property data store the conditions it wants applied, and the Property store can use whatever it needs to make that happen (in this case an AR with_scope). See Rick's example for a better separation of responsibilities. -- tim --~--~-~--~~~---~--~~ Yo

[Rails-core] Re: future of scaffolding / simple suggestion

2007-05-27 Thread Tim Lucas
if order.complete? order.archive! end end There's nothing wrong with the way the scaffolding iterates (for x in y). -- tim --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rail

[Rails-core] Re: Tick #8432: Exception notification plugin and parameters with sensitive info

2007-05-24 Thread Tim Lucas
On 24/05/2007, at 5:05 PM, Michael Koziarski wrote: >> On 5/23/07, Tim Lucas <[EMAIL PROTECTED]> wrote: >>> >>> http://dev.rubyonrails.org/ticket/8432 > > This is jamis' baby and he's on holiday till the weekend. Looks good > to me though, so he

[Rails-core] Tick #8432: Exception notification plugin and parameters with sensitive info

2007-05-22 Thread Tim Lucas
t card numbers *cough*). > > Attached is a patch (with tests) that uses the controller's param > filtering to make sure emails don't contain any surprises. This fixes a potential security problem for anybody using the ExceptionNotification plugin and processi

[Rails-core] Re: A little love for acts_as_taggable #8279

2007-05-07 Thread Tim Lucas
;ticket=on Updated readme: http://dev.rubyonrails.org/ticket/8287 Doesn't help that it's in the Rails plugin dir which is included in ./ script/plugin's default set of search paths. -- tim --~--~-~--~~~---~--~~ You received this message because you are

[Rails-core] Re: A little love for acts_as_taggable #8279

2007-05-07 Thread Tim Lucas
ods all work fine already. > > http://blog.evanweaver.com/pages/has_many_polymorphs and let's face it: any plugin with a "self-referential tagging generator" is naturally going to pwn all alternatives. -- tim --~--~-~--~~~---~--~~ You received t

[Rails-core] Re: SVN Repository Down?

2007-04-25 Thread Tim Connor
It's not just you (same here). On Apr 25, 11:23 am, John Wilger <[EMAIL PROTECTED]> wrote: > I'm getting a connection reset error when trying to access the Rails > Subversion repository. Is anyone else seeing this, or is there > something funky going on on my end? --~--~-~--~~--

[Rails-core] [PATCH] Move . to optional_separators in Routing?

2007-04-25 Thread Tim Connor
http://dev.rubyonrails.org/ticket/8187 This nicely supplements yesterday's changeset adding the .:format to the default route: http://dev.rubyonrails.org/changeset/6576 as it allows for leaving the trailing dot off if there is a default format. Thus both Rails style and .format style URLS work.

[Rails-core] Re: Sharing a resource's schema through REST

2007-04-24 Thread Tim Pope
't fit cleanly into the four CRUD actions. This was accepted as a necessary compromise for interactive uses, but now it's creeping into the API as well. Cheers, Tim --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups &q

[Rails-core] Re: Sharing a resource's schema through REST

2007-04-24 Thread Tim Pope
On Sat, Apr 21, 2007 at 11:33:35PM -0500, Tim Pope wrote: > On the subject of XML schemas, the biggest missing piece of the puzzle > is a way to get the appropriate attributes on the root element for > records. I am thinking an interface would look something like > >

[Rails-core] Re: Sharing a resource's schema through REST

2007-04-23 Thread Tim Pope
ema => new_person_url(:format > => :xml)) > > And maybe, to address Michael's concern, we could support both a > simple and a RelaxNG format for model schemas: Sure, there are many ways it could be done. The interface I discuss is the bare minimum necessary to play with this

[Rails-core] Re: Should resource_feeder render_rss_feed_for choke on date (instead of datetime) [PATCH]

2007-04-23 Thread Tim Connor
I made a tiny patch (with tests of course) that calls to_time before to_s(:rfc822). This means if pub_date is just a date, not a full datetime, the feed will still be valid. As a side-effect, you get a less cryptic nil error. The patch also fixes a failing test on resource_feeder, at least on m

[Rails-core] Re: Should resource_feeder render_rss_feed_for choke on date (instead of datetime)

2007-04-23 Thread Tim Connor
I wonder if nil.to_s should be extended to accept an optional parameter and still throw the nil exception, to make errors on nil.to_s with the Rails extensions less obscure? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google G

[Rails-core] Re: Should resource_feeder render_rss_feed_for choke on date (instead of datetime)

2007-04-22 Thread Tim Connor
Please ignore. I still think it's a cryptic error to throw on a nil, but there was a mistake in my code/data. to_s(:rfc822) works fine on a date field, as long as it isn't null/nil. --~--~-~--~~~---~--~~ You received this message because you are subscribed to th

[Rails-core] Should resource_feeder render_rss_feed_for choke on date (instead of datetime)

2007-04-22 Thread Tim Connor
I guess I'll work around it with a lamda and a to_time, for now, but to_s(:rfc822) exists in the rails time extensions, but not the date extensions, so if you try to use a date field for pub_date it chokes. My uncertainty is if to_s(:rfc822) should be added to Date (do a to_time, first?) or if res

[Rails-core] Move . to optional_separators in Routing?

2007-04-22 Thread Tim Connor
I wanted to check on this before submitting a patch - see if I am missing anything. If you have a non resource route (useful, even when doing REST, for supplying a different limited public access to your rest controller, say) you have to add the format to the route yourself, but having "." be in

[Rails-core] Re: Sharing a resource's schema through REST

2007-04-21 Thread Tim Pope
:xsi' => "http://www.w3.org/2001/XMLSchema-instance";, 'xsi:noNamespaceSchemaLocation' => formatted_people_url(:xsd) } ) The implementation should be simple enough, but before I do it I want to get some feedback on the interface (or at least, not get negative feedback). Cheers, Ti

[Rails-core] Re: Sharing a resource's schema through REST

2007-04-20 Thread Tim Pope
ary of. I agree, most of this is destined for plugin land at most. But I think reusing the types in the core is a Good Thing. Cheers, Tim --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core&qu

[Rails-core] Re: Musings - how thin can controllers go

2007-04-12 Thread Tim Connor
Thanks, as well, Rich. So between this and drops it seems a favored way of handling this dichotomy of responsibilities is presenter classes of some sort. Well I suppose that looking to Martin Fowler for patterns in Rails should be expected. ;) Tim

[Rails-core] Re: Musings - how thin can controllers go

2007-04-11 Thread Tim Connor
ed as a presenter class might make sense. In classic MVC, if I recall my CS classes correctly, controllers were a little more than presentational tweak-and-load layers for the models. Tim On Apr 11, 3:42 pm, Courtenay <[EMAIL PROTECTED]> wrote: > > > > And once you go down

[Rails-core] Re: Musings - how thin can controllers go

2007-04-11 Thread Tim Connor
On Apr 11, 2:35 pm, "Mislav Marohnić" <[EMAIL PROTECTED]> wrote: > On 4/11/07, Tim Connor <[EMAIL PROTECTED]> wrote: > > > > > And once you go down that road, that starts > > looking like the more purely OO approach of just having the model > &

[Rails-core] Musings - how thin can controllers go

2007-04-11 Thread Tim Connor
The core team seems to be all about practicality, rather than theory, but as I do more and more REST development, it gets me thinking Mainly about how controllers are just becoming thin proxies for the true object - models. And then I wonder, how far will this trend go. Should Resource Feeder

[Rails-core] Re: Deprecate dynamic scaffolding

2007-04-03 Thread Tim Connor
On Mar 3, 7:40 pm, "Josh Peek" <[EMAIL PROTECTED]> wrote: > The plugin is a direct port, no new enhancements, even though it could > use some. O, and for the first time, scaffolding tests! > I'm not maintaining it anymore, but I did create a full dynamic resource scaffolding plugin, last year, th

[Rails-core] Ticket 7893: Adding the ability to remove collection and member route generation for Resources

2007-03-22 Thread Tim Carey-Smith
Hello all, I'm a resource junkie, so I have put together a patch for making nested resources nicer to manage and simultaneously guarded against invalid access to "bad urls". Hopefully I have keep the code clean enough for you all, and haven't munged the test code too badly

[Rails-core] Div in form of button_to

2007-03-17 Thread Tim Connor
Sorry if this has been mentioned elsewhere, but I couldn't find a post about it, or an explanation in the code. I double-checked the history and it seemed to have been that way since it was first added. I was encountering some oddities in styling my form, and realized that there is a redundant (

[Rails-core] Re: simply_helpful's form_for not respecting default_url_options (only_path)

2007-03-15 Thread Tim Connor
I'll see what I can do ;) On Mar 15, 2:17 pm, "Michael Koziarski" <[EMAIL PROTECTED]> wrote: > > If I could track down and modify this behavior, would there be enough > > interest in it (it may be right at the edge of my ruby-fu) to get it > > patched in? I know the usual answer is "make a plugi

[Rails-core] simply_helpful's form_for not respecting default_url_options (only_path)

2007-03-15 Thread Tim Connor
Looking over the discussions and Trac tickets am I correct in assuming that the simply_helpful's form_for not respecting the default_url_options (specifically only_path) is a side-effect of some other default behavior choices? Personally, I set only_path to true as my default as I think except we

[Rails-core] Re: Continuous integration build for Rails

2007-03-09 Thread Tim Lucas
ot;test_mysql" rake test handles it all for you, you just need to make sure your test connection is set up correctly and the databases exist. You'll want a separate test database for each db/ platform "project". Look at the RUNNING_UNIT_TESTS file for more info, or

[Rails-core] Re: Rails AR/Oracle Unit Test: [6364] failed (getting worse)

2007-03-08 Thread Tim Lucas
On 09/03/2007, at 4:38 PM, Michael A. Schoen wrote: > Tim Lucas wrote: >> Want me to submit another patch for this bug? I can't actually test >> Oracle though... > > Thanks Tim. I'll bundle this up w/ a patch for the other issue, > probably > s

[Rails-core] Re: Rails AR/Oracle Unit Test: [6364] failed (getting worse)

2007-03-08 Thread Tim Lucas
class AdapterTestOracle < Test::Unit::TestCase def setup @connection = ActiveRecord::Base.connection end def test_should_quote_string_mixed_case_column_names assert_equal %("mixedCase"), @connection.quote_column_name

[Rails-core] CI for MySQL + PostgreSQL

2007-03-08 Thread Tim Lucas
Any interest in setting up CI w/ test notifications for MySQL + PostgreSQL, similar to the Oracle and SQLServer ones we have currently? I'm happy to run a PostgreSQL one here. -- tim --~--~-~--~~~---~--~~ You received this message because you are subsc

[Rails-core] Re: Deprecate dynamic scaffolding

2007-03-01 Thread Tim Lucas
framework gets updated and best practices evolve. If scaffolding's purpose is for learning purposes only, maybe is should be stated as such: ./script/generate example_controller ? -- tim --~--~-~--~~~---~--~~ You received this message because you are

[Rails-core] Re: Support for processing after the response has been transmitted?

2006-12-30 Thread Tim Lucas
his in multiple places already... silly me. Best to shut my trap until the new years detox. Happy New Years all. A big thankyou to all those who have contributed to Rails in 2006! -- tim --~--~-~--~~~---~--~~ You received this message because you are subscribe

[Rails-core] Re: Support for processing after the response has been transmitted?

2006-12-30 Thread Tim Lucas
On 31/12/2006, at 3:34 AM, Mark Reginald James wrote: Is there any interest in allowing controller methods to do post-response processing? I'm pretty sure you can just do the following: def show # fetch me something to render render # do some long operation end -

[Rails-core] Re: Changeset #5738 Breaks plugins loading (Still)

2006-12-27 Thread Tim Lucas
On 20/12/2006, at 11:37 AM, Tim Lucas wrote: On 20/12/2006, at 11:18 AM, James Adam wrote: Ah. I see the problem. Josh is referring to a Constant in his production.rb environment file which is only available in a plugin. However, because the environment/*.rb files are loaded BEFORE plugins

[Rails-core] Re: Changeset #5738 Breaks plugins loading (Still)

2006-12-19 Thread Tim Lucas
;t this be solved with after_initialize? I do this for any non- rails specifics within environment configs: config.after_initialize do SystemPaths.smtp_conf_file = "/etc/conf/smtp.conf" end -- tim --~--~-~--~~~---~--~~ You received this message because y

[Rails-core] Re: Changeset #5738 Breaks plugins loading (Still)

2006-12-19 Thread Tim Lucas
/ environments/production.rb Have you require'd your paypal library at _the top_ of your environment.rb? -- tim --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to t

[Rails-core] Re: Plugins Specifying Compatible Rails Versions

2006-12-14 Thread Tim Lucas
init and produce a (silence-able) warning (like the deprecation warnings) might be handy though. It'll at least encourage hacky plugins to be up front about forward-compatibility. -- tim --~--~-~--~~~---~--~~ You received this message because you are s

[Rails-core] Re: [offtopic] HTTP Authentication in Safari is broken for RESTful Rails

2006-11-29 Thread Tim Lucas
On 30/11/2006, at 12:09 AM, Thijs van der Vossen wrote: > > On Nov 25, 2006, at 12:01 AM, Tim Lucas wrote: >> On 25/11/2006, at 6:35 AM, Thijs van der Vossen wrote: >>> There's currently a bug in Safari, or more likely somewhere in >>> the OS >>> X H

[Rails-core] Re: application controller methods and routes (RC1)

2006-11-28 Thread Tim Lucas
y default. I don't believe your controllers need to inherit from ApplicationController, so standing by itself it should be ok to route to it. In saying that, though, if you're doing this on a standard Rails app then you're probably doing something wrong. -- tim --~--~

[Rails-core] Re: Using Active Record to process large tables.

2006-11-01 Thread Tim Connor
Whenever you are doing extremely large set operations, ANY ORM is going to be slow. And row by row is always orders of magnitude slower than whole set operations, in SQL. Might this not be a time to optimize your model with a tiny bit of direct SQL? I've literally seen improvements in multiple

[Rails-core] Re: Dynamic scaffold_resource

2006-10-26 Thread Tim Connor
Project moved to Google Code http://code.google.com/p/dynamic-scaffold-resource/ Subversion history preserved, but clean checkouts required, as the repo UID is changed, and the dynamic-scaffold-resource stuff is now in the root of the repo. --~--~-~--~~~---~--~~ Y

  1   2   >