Re: [Rails-core] How to test Rails 3?

2009-12-31 Thread John Trupiano
In the past you've been able to run 'rake dev' from within railties. Not sure if that's still alive on 3.0. -John On Thu, Dec 31, 2009 at 4:50 PM, Rodrigo Rosenfeld Rosas wrote: > Hi, one more question before this year ends... > > How can I create a Rails application from my local branch? > >

[Rails-core] Re: RAILS_ENV hardcoded in too many places

2009-10-13 Thread John Trupiano
+1 I've had similar problems. -John On Tue, Oct 13, 2009 at 12:53 PM, Mislav Marohnić wrote: > The default value for RAILS_ENV is set to "development" in initializer.rb, > which is loaded right after boot.rb has determined the boot strategy. > I created a "config/preinitializer.rb" which was sup

[Rails-core] Re: rake dev on 2-3-stable is still broken

2009-10-05 Thread John Trupiano
onfig/environment.rb of the generated app. -John On Mon, Oct 5, 2009 at 4:32 PM, John Trupiano wrote: > Hi Jeff, > From within the railties project, running 'rake dev' will generate a rails > app with the current codebase and stick it in LOCAL_CHECKOUT_ROOT/rails. > >

[Rails-core] Re: rake dev on 2-3-stable is still broken

2009-10-05 Thread John Trupiano
te: > > What is meant by "rake dev", by the way? > > rake -T with a clean 2.3.4 app doesn't show any task named "dev" on my > box. > > Jeff > > On Oct 4, 2:22 pm, John Trupiano wrote: > > Hey guys, can we get this patch applied? Current

[Rails-core] rake dev on 2-3-stable is still broken

2009-10-04 Thread John Trupiano
Hey guys, can we get this patch applied? Currently the rails app generated with 'rake dev' is broken. A patch with more than enough +1's was submitted during the rails bugmash: https://rails.lighthouseapp.com/projects/8994/tickets/3268-erd-in-environmentrb-after-running-rake-dev -John --~--~---

[Rails-core] Re: A resource named "image" gives problems

2009-08-29 Thread John Trupiano
I've had problems with Template in the past (which isn't on the wiki list). -John On Sat, Aug 29, 2009 at 4:05 AM, Colin Law wrote: > > 2009/8/29 Chris Hanks : > > > > I've found naming a resource "Test" to be problematic, which is kind > > of a drag in an educational application. > > > > For fu

[Rails-core] Re: Survey Says: Partial Variables

2009-08-10 Thread John Trupiano
Personally, I'm a huge fan of treating partials as true method calls and ensuring that all required objects are passed in as locals. I can't speak for others, but this optimization would not have a single negative side effect for me. -John --~--~-~--~~~---~--~~ Yo

[Rails-core] Re: Rails scaffold on 3.0

2009-08-10 Thread John Trupiano
s, some professionals even mark up form fields with >> tables because, contrary to the popular belief, they can be accessible as >> well. >> >> In short: let's keep this markup simple and neutral by mostly using the >> non-semantic DIV. The markup doesn't h

[Rails-core] Re: RFC: Improving the rack parameter normalization

2009-08-07 Thread John Trupiano
Hi Andy, I have in the past built an extension to the form_for helper family to accept a :element_id_prefix option that handles the "multiple html elements with the same ID" problem. It's been sitting on my to-do list for awhile to convert it to a rails patch and submit it for consideration. I l

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

2009-05-26 Thread John Trupiano
re > > of course applied to whatever sanitized hash you pass. So in > > particular you can only narrow accessible aattributes (or extend > > protected attributes) > > > > Going the other way around sounds better to me, n

[Rails-core] Re: flash

2009-04-22 Thread John Trupiano
intentional, and if so why? > > -- > Amos King > aka: Adkron > http://dirtyInformation.com > http://github.com/Adkron > -- > Looking for something to do? Visit http://ImThere.com > > > > -- John Trupiano President SmartLogic Solutions http://www.smartlogic

[Rails-core] Re: accepts_nested_attributes_for patch request

2009-04-05 Thread John Trupiano
t; > Is there a reason it was skipped? > > Eloy would know for sure, but I believe it was left out because of the > risk in accidentally deleting objects just because you disabled a form > element, or was paginating in a form, or something similar. > > -- > Cheers > > K

[Rails-core] Re: Mass Assignment Vulnerability -- Another Suggestion

2009-03-02 Thread John Trupiano
> Authentication belongs to the controller. Securing models should > belong in the validation cycle, ensuring that *all* code hitting the > models goes through the same security validation process. Gaspard, I'd argue that the issue at hand is authorization, and not necessarily validation. A set

[Rails-core] Mass Assignment Vulnerability -- Another Suggestion

2009-03-01 Thread John Trupiano
Hey guys, Several of you chimed in on the blog post I wrote last week discussing mass assignment vulnerabilities (and how nested mass assignment created further exposure). Thanks for pitching in a hand on the discussion. I've submitted a patch to docrails to beef up the mass assignment section

[Rails-core] Re: Executing Multiple SQL Statements for MySQL Adapter

2009-02-19 Thread John Trupiano
Sure, I wasn't trying to argue your point. I was just suggesting that there does exist legitimate circumstances where you'd want to circumvent this "protection." Jonathon, are you suggesting that due to the risks, we shouldn't allow any way to (even in a very localized fashion) allow us to bypas

[Rails-core] Re: Executing Multiple SQL Statements for MySQL Adapter

2009-02-19 Thread John Trupiano
're supposed to do anyway when receiving data from the client), you'd avoid this, no? -John On Feb 19, 1:44 am, Jonathan Weiss wrote: > Cheers, > > John Trupiano wrote: > > Hey guys, > > > Is this the recommended procedure for executing multiple SQL > > statements

[Rails-core] Re: Executing Multiple SQL Statements for MySQL Adapter

2009-02-18 Thread John Trupiano
> or the user-specific mysql settings.  By not providing a value in > rails we just fall back to the user / system wide settings. Max packet > size isn't really something I think we need in the database.yml. > > > > On Thu, Feb 19, 2009 at 4:32 AM, John Trupiano wrote: > &

[Rails-core] Executing Multiple SQL Statements for MySQL Adapter

2009-02-18 Thread John Trupiano
Hey guys, Is this the recommended procedure for executing multiple SQL statements in a single call? http://www.seanr.ca/tech/?p=75 In other words, do we have a config option to trun on CLIENT_MULTI_STATEMENTS for MySQL? Or are we still being advised to go directly into the rails source to achi

[Rails-core] Re: time_select and config.time_zone, handling cases when a timezone isn't applicable

2008-09-10 Thread John Trupiano
x for this in soon (should be simple, we just > need to add a check in #instantiate_time_object for the column type), > but in the meantime, this will work: > > class Store >   def self.skip_time_zone_conversion_for_attributes >     [:opens] >   end > end > > Geoff >

[Rails-core] Re: time_select and config.time_zone, handling cases when a timezone isn't applicable

2008-09-10 Thread John Trupiano
Hey Geoff, Liam, I'm running into the same issue, and it's very simple to create an example. 1) $> rails time_select_problem 2) $> cd time_select_problem 3) $> ruby script/generate scaffold stores name:string opens:time 4) Edit config/environment.rb, set config.time_zone = 'Eastern Time (US & Ca

[Rails-core] Re: Out with database.yml

2008-06-12 Thread John Trupiano
don't have to be repetitive: > > > defaults: &defaults > > That's also a lot harder to read and write, especially for newbies. I > definitely support an all-ruby approach. Supporting some generic hash > merging, as Scott suggested, might not be a bad idea though. > >