[Rails-core] Decoupling of ActionPack

2013-07-10 Thread Alexander Kurakin
Hello! Are the plans of splitting ActionPack for several gems (AbstractController, ActionView, etc)? Like https://github.com/rails/rails/pull/7356 ... I.e. I know gems that are needed AbstractController only... And they are forced to require the whole ActionPack... Thanx. -- You received

[Rails-core] Rendering collections with custom partial paths

2013-02-03 Thread Alexander Kurakin
Good day! Sometimes we want just to render a collection: render partial: collection: @cars Sometimes we want to render a collection using custom partial name: render partial: 'car_short', collection: @cars Ok but if Car has has STI-subclasses we should write class Car ActiveRecord::Base;

[Rails-core] Re: Rendering collections with custom partial paths

2013-02-03 Thread Alexander Kurakin
The idea is to make an ability to give a Proc to 'partial' option. It will be yielded with 'object' argument: render partial: - { |car| #{car.to_partial_path}_#{your_role_for(car)} }, collection: @cars It's backward compatibility... -- You received this message because you are subscribed to

Re: [Rails-core] Suggestion: default values for models

2012-10-18 Thread Alexander Kurakin
mean with We can use db's default values but they are evaluated during migrations? On Oct 17, 2012, at 8:28 PM, Alexander Kurakin wrote: ROR doesn't realize functionality of setting default values for models. We can use db's default values but they are evaluated during migrations. We can't

[Rails-core] Suggestion: to extract AC filter methods

2012-10-17 Thread Alexander Kurakin
Suggestion: to extract AbstractController::Callbacks::ClassMethods (maybe to ActiveSupport). Mechanism 'before/after/around' isn't connected with controllers only. Is it? Why not to consider it with ActiveSupport::Callbacks? It will make a possibility to do your own events for

[Rails-core] Re: Suggestion: render filters

2012-10-17 Thread Alexander Kurakin
. It will be simply to realize with accepting suggestion https://groups.google.com/forum/?fromgroups#!topic/rubyonrails-core/uotv0zVISRE . среда, 5 сентября 2012 г., 22:53:50 UTC+4 пользователь Alexander Kurakin написал: Will not be useful functionality similar https://github.com/shell

[Rails-core] Suggestion: default values for models

2012-10-17 Thread Alexander Kurakin
ROR doesn't realize functionality of setting default values for models. We can use db's default values but they are evaluated during migrations. We can't set default value i.e. Time.now. But there are completed gems that realize this. I.e. default_value_for

[Rails-core] Suggestion: render filters

2012-09-05 Thread Alexander Kurakin
Will not be useful functionality similar https://github.com/shell/rails3_before_render ? Something like ActionController filters but not before action. Filters before render. See also http://www.perfectline.ee/blog/ruby-on-rails-before-render-filter,

Re: [Rails-core] Suggestion; a mechanism to specify asset path for controller (or specified actions)

2012-08-18 Thread Alexander Kurakin
What about images? Ok, I said: it's possible. Is it possible with relax? For layouts - possible. But for assets? суббота, 18 августа 2012 г., 16:21:32 UTC+4 пользователь mrloz написал: Couldn't this be simply achieved by using a layout which uses different CSS files? So Layout1 loads