Re: [Rails-core] Is Rails 4 going to render JSON as a stream by default?

2012-11-02 Thread Robert Pankowecki
https://github.com/brianmario/yajl-ruby Yajl is capable of doing it. So hacking together Yajl and ActionController::Live might give you streaming json as it is produced. Robert Pankowecki -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Core group

Re: [Rails-core] define_methods functionality

2012-10-04 Thread Robert Pankowecki
What is the usecase? What value does it provide ? How is it any better than ? def title; nil; end def type; nil; end Maybe it is just me but I totally do not get what your are trying to achieve. Robert Pankowecki -- You received this message because you are subscribed to the Google Groups

Re: [Rails-core] Overring methods on engines

2012-09-28 Thread Robert Pankowecki
Probably because of the way how Rails is looking for constants ? I would guess that it does not read the file from engine at all, and just reads the file from your app. Robert Pankowecki http://robert.pankowecki.pl On Fri, Sep 28, 2012 at 12:59 PM, Luís Ferreira zamith...@gmail.com wrote: Hey

Re: [Rails-core] database uri for database.yml

2012-09-24 Thread Robert Pankowecki
Proposed alternative: production: uri: postgres://username:passw...@database.host.com:5432/production_db pool: 5 Alternative: production: postgres://username:passw...@database.host.com:5432/production_db?pool=5 Robert Pankowecki http://robert.pankowecki.pl -- You received

Re: [Rails-core] database uri for database.yml

2012-09-24 Thread Robert Pankowecki
On Mon, Sep 24, 2012 at 4:29 PM, Fabian Becker fabian.becke...@gmail.com wrote: What makes that solution better than the current (more readable) version? It is less verbose I guess. Also java, .net and mongo use/support connection strings. Robert Pankowecki -- You received this message

[Rails-core] Re: Renaming Journey and avoiding libraries with common noun names

2012-09-22 Thread Robert Pankowecki
MyProject::Journey def self.model_name @model_name ||= ActiveModel::Name.new ::Journey end end I am not sure if that would work perfectly but you can give it a try. Robert Pankowecki http://robert.pankowecki.pl/ -- You received this message because you are subscribed to the Google Groups

Re: [Rails-core] Is flash.now necessary?

2012-09-07 Thread Robert Pankowecki
I sometimes use flash to keep things between multiple request ex. searched word and use FlashHash#keep in before filter to keep it when user is still using the same controller. How can I keep something for the next request when rendering in your proposed solution? Would I have to set flash and

Re: [Rails-core] Is flash.now necessary?

2012-09-07 Thread Robert Pankowecki
' Works fine for me. i.e., keep the common case clean, at the expense of making the unusual case a bit more work. I agree. Just didn't want the unusual case to be impossible after some refactoring. Thanks for your input. :) You are welcome. Robert Pankowecki -- You received this message

Re: [Rails-core] Asset compilation parallelization

2012-07-31 Thread Robert Pankowecki
If you have time, just do it please :) Lot of people will be grateful. Be aware that thread parallelization (probably most obvious and simple solution) won't give us any benefit on MRI. Robert Pankowecki -- You received this message because you are subscribed to the Google Groups Ruby on Rails

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

2012-05-09 Thread Robert Pankowecki
PostsToDasherize.all.each{|p| p.dasherize! } # Use batches instead end end def self.down # ... end end Robert Pankowecki -- 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

Re: [Rails-core] On handling staging servers

2012-04-13 Thread Robert Pankowecki
Or you can just symlink staging.rb to production.rb. But I would never risk a mistake coming from fact that the entry in my database.yml for staging would be called production. Robert Pankowecki -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Core

Re: [Rails-core] ActiveRecord and [] accessors

2012-04-07 Thread Robert Pankowecki
controller: [:deleted, :disabled].each{|p| model.send :#{p}=, params[p] == 'true' } model.update_attributes(params.slice(:deleted, :disabled)). And let your model handle the conversion of attribute values. Robert Pankowecki -- You received this message because you are subscribed to the Google

Re: [Rails-core] Re: Why do we have release candidates for patch releases?

2011-11-15 Thread Robert Pankowecki
RC releases are very important. If you don't want to use them (don't care about them), fine. I found few bugs in RC versions and used veto to reschedule their release. All of that with simply changing my Gemfile and running rake test. Robert Pankowecki -- You received this message because you

Re: [Rails-core] Making after_commit hooks testable with transactional fixtures

2011-10-12 Thread Robert Pankowecki
On Wed, Oct 12, 2011 at 11:53 PM, Will Bryant will.bry...@gmail.com wrote: You can turn transaction fixtures off for an individual set of tests though Exacyly what I mean. class Test ActiveSupport::TestCase self.use_transactional_fixutures = false end -- You received this message because

Re: [Rails-core] Making after_commit hooks testable with transactional fixtures

2011-10-11 Thread Robert Pankowecki
What's wrong with turning off transactional fixtures in the tests that check after_commit/after_rollback functionality ? You can check what you need and clean the db yourself in the test or teardown. Robert Pankowecki -- You received this message because you are subscribed to the Google Groups

Re: [Rails-core] Custom exceptions on validations

2011-08-22 Thread Robert Pankowecki
Which exception would you raise if 2 validations fail ? Robert Pankowecki -- 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 group, send email

[Rails-core] Wrong action names

2011-07-13 Thread Robert Pankowecki
Is there somewhere a list of names that should not be used as action names ? I recently created an action named load and it disappeared from inherited controller. Would such a list be equal to : AbstractController::Base.internal_methods ? Robert Pankowecki http://robert.pankowecki.pl -- You

Re: [Rails-core] Namespaced Scaffolds and AR

2011-06-27 Thread Robert Pankowecki
Works fine for me thanx to ecom.rb module Ecom def self.table_name_prefix 'ecom_' end end make sure that you have class Ecom::Cart ActiveRecord::Base end instead of module Ecom class Cart ActiveRecord::Base end end in your ecom/cart.rb Robert Pankowecki http

Re: [Rails-core] Re: Namespaced Scaffolds and AR

2011-06-27 Thread Robert Pankowecki
I think it is done this way to easily overwrite table_name_prefix for all tables of namespaced models. And when it comes to decision making process I know nothing about it so I cannot help you with that question. Robert -- You received this message because you are subscribed to the Google

Re: [Rails-core] [ANN] Rails 3.0.8.rc3 (third time is the charm!)

2011-05-31 Thread Robert Pankowecki
3.0.8.rc3 had this Syck issue : https://github.com/rails/rails/issues/1412 which is a mystery for me however 3.0.8.rc4 works fine for me! :-) Robert Pankowecki -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Core group. To post to this group, send

Re: [Rails-core] [ANN] Rails 3.0.8.rc2

2011-05-30 Thread Robert Pankowecki
Current 3-0-8 branch works fine for me now :-) Robert Pankowecki -- 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 group, send email

[Rails-core] Alternative I18n convention for namespaced models

2011-05-30 Thread Robert Pankowecki
https://github.com/rails/rails/issues/1402 Can we expect support for that in Rails 3.1.0 ? Robert Pankowecki -- 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

Re: [Rails-core] [ANN] Rails 3.0.8.rc2

2011-05-28 Thread Robert Pankowecki
This https://github.com/rails/rails/issues/1322 is not fixed in 3.0.8.rc2 :-( I'm still getting the same error. Robert Pankowecki -- 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

Re: [Rails-core] Re: [ANN] Rails 3.0.8.rc1

2011-05-26 Thread Robert Pankowecki
Double veto: https://github.com/rails/rails/issues/1326 -- 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 group, send email to

Re: [Rails-core] Re: [ANN] Rails 3.0.8.rc1

2011-05-26 Thread Robert Pankowecki
https://github.com/rails/rails/issues/1322 Does this pull request fix the issue?  https://github.com/rails/rails/pull/1317 No. And I could not reopen the ticket. Robert Pankoweck -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Core group. To

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

2011-04-30 Thread Robert Pankowecki
Any new ideas on this topic ? It seems that we always produce a String and then turn it into symbol. Do you want me to create some benchmarks so we can discuss the switch based on some facts ? Robert Pankowecki -- You received this message because you are subscribed to the Google Groups Ruby

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

2011-04-08 Thread Robert Pankowecki
Thanks for the information. I got NoMethodError: undefined method `-' for #Date:0x97829f0 when trying to subtract two dates so I thought that the operator is defined in Rails. Apparently it is not. require 'date' must be called to have it. Not very intuitive. Robert Pankowecki -- You

Re: [Rails-core] [ANN] Rails 3.0.6.rc1

2011-03-30 Thread Robert Pankowecki
/6448-i18n-key-collision-with-namespaced-models#ticket-6448-11 I would have: class Articles module Articles class Articles::Articles This a big break in API and it happens second time during last 5 releases. Could we clarify this thing once for all the time? Robert Pankowecki -- You received

Re: [Rails-core] [ANN] Rails 3.0.6.rc1

2011-03-30 Thread Robert Pankowecki
I meant class Articles module Articles class Articles::Category -- 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 group, send email to

Re: [Rails-core] [ANN] Rails 3.0.6.rc1

2011-03-30 Thread Robert Pankowecki
for RC release and the ability to test and veto :-) Robert Pankowecki -- 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 group, send email

Re: [Rails-core] [ANN] Rails 3.0.6.rc1

2011-03-30 Thread Robert Pankowecki
to create tickets for them ? Yes please.  Does this happen on 3.0.4 too? Yes 3.0.4, 3.0.5, 3.0.6.rc1, maybe even earlier versions. https://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/6654-dateyesterday-and-datetomorrow-returns-wrong-values Robert Pankowecki -- You received

Re: [Rails-core] [ANN] Rails 3.0.6.rc1

2011-03-29 Thread Robert Pankowecki
:i18n_key method anymore. Robert Pankowecki -- 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 group, send email to rubyonrails-core+unsubscr

Re: [Rails-core] [ANN] Rails 3.0.6.rc1

2011-03-29 Thread Robert Pankowecki
= Wed, 30 Mar 2011 As you can see the simple expectation that yesterday = today -1 and tomorrow = today + 1 is apparently not true in some cases. This problem probably happens around midnight in some zones... Do you want me to create tickets for them ? Robert Pankowecki -- You received

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

2011-03-16 Thread Robert Pankowecki
scenarios. Robert Pankowecki -- 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 group, send email to rubyonrails-core+unsubscr...@googlegroups.com

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

2011-03-16 Thread Robert Pankowecki
it ? Robert Pankowecki -- 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 group, send email to rubyonrails-core+unsubscr...@googlegroups.com

Re: [Rails-core] rake issues

2011-03-04 Thread Robert Pankowecki
Or db:test:prepare ... Robert Pankowecki -- 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 group, send email to rubyonrails-core+unsubscr

[Rails-core] best_standards_support

2011-02-28 Thread Robert Pankowecki
? Robert Pankowecki -- 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 group, send email to rubyonrails-core+unsubscr...@googlegroups.com. For more

[Rails-core] Re: best_standards_support

2011-02-28 Thread Robert Pankowecki
in development environment to an unsupported value that does not change the behavior at all makes me a little confused. Robert Pankowecki -- 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

Re: [Rails-core] best_standards_support

2011-02-28 Thread Robert Pankowecki
My guess is that we do now want to test IE using Chrome mode in development environment because we want to use the application like a user with normal IE to see possible differences in behavior. Robert Pankowecki -- You received this message because you are subscribed to the Google Groups Ruby

Re: [Rails-core] best_standards_support

2011-02-28 Thread Robert Pankowecki
...My guess is that we do NOT want ... -- 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 group, send email to

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

2011-02-23 Thread Robert Pankowecki
it works the same way in master ? Robert Pankowecki -- 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 group, send email to rubyonrails-core+unsubscr

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

2011-02-16 Thread Robert Pankowecki
the intentions clearly Robert Pankowecki -- 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 group, send email to rubyonrails-core+unsubscr

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

2011-02-16 Thread Robert Pankowecki
by David ? Robert Pankowecki -- 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 group, send email to rubyonrails-core+unsubscr

Re: [Rails-core] release more Arel power?

2011-02-13 Thread Robert Pankowecki
and other nice methods... If that's possible, maybe that's our goal ? Robert Pankowecki -- 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 group

Re: [Rails-core] ActionMailer ms exchange server

2011-01-05 Thread Robert Pankowecki
are you trying to do it directly? I think you should use something like http://davmail.sourceforge.net/ as a proxy. Next time ask such questions on rails-talk list. Robert pankowecki Http://robert.pankowecki.pl W dniu 2011-01-05 22:39 użytkownik gReg gdjamer...@gmail.com napisał: Trying

[Rails-core] Additional patches for bug #6036

2011-01-03 Thread Robert Pankowecki
I submited additional patches (master and 3.0-stable) for bug #6036 because it was not fixed completely. https://github.com/rails/rails/pull/147 https://github.com/rails/rails/pull/148 Robert Pankowecki -- You received this message because you are subscribed to the Google Groups Ruby on Rails

Re: [Rails-core] has_many :dependent = :destroy and association callbacks

2010-12-30 Thread Robert Pankowecki
I'm glad to hear it. Robert Pankowecki -- 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

[Rails-core] has_many :dependent = :destroy and association callbacks

2010-12-28 Thread Robert Pankowecki
Today I noticed that calling object.collection.destroy_all leads to calling association callbacks like ex. :before_remove but object.destroy does not call those callbacks when configured with :dependent = :destroy option. You can find that hbtm uses collection.clear which under the hoods calls

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

2010-11-14 Thread Robert Pankowecki
but they will stay forever in the application. I think that version a is better. I would like to here other opinions. Robert Pankowecki -- 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

[Rails-core] I18n, validations and symbols

2010-11-02 Thread Robert Pankowecki
, :activerecord.errors.messages.blank, :errors.attributes.name.blank, :errors.messagges.blank, Can't be blank ] Both would work. I would like to know what you think about the problem and solution. Robert Pankowecki -- You received this message because you are subscribed to the Google Groups Ruby

[Rails-core] Re: Progressive rendering

2010-10-10 Thread Robert Pankowecki
, :finalize = true or content_for :foo, baz, :freeze = true Robert Pankowecki -- 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

Re: [Rails-core] Re: asset_host and ActionMailer

2010-08-05 Thread Robert Pankowecki
be extended to all of the action_ and active_ components. Totally agree. Robert Pankowecki -- 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

Re: [Rails-core] ActiveRecord associations seem to assume primary keys are always integers

2010-07-29 Thread Robert Pankowecki
might want to verify so it is applied faster. Robert Pankowecki -- 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

[Rails-core] Collection singular ids setter fixed.

2010-07-19 Thread Robert Pankowecki
I made a patch for a bug that I found in AR: https://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/5125-collection_singular_ids-method-raises-an-exception-when-primary_key-is-string-rails-3 I'm looking for some people to review it. It is a very simple patch with tests included. I