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
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;
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
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
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
. 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
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
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,
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