Hehe, quanto ao tradutor, não será certamente o problema ;) Obrigado pelo
link, vou dar uma olhada então.
On Wednesday, October 17, 2012 3:17:44 PM UTC+2, Gabriel Sobrinho wrote:
ChuckE,
The master application had the only objective to handle the migrations
that was shared between the
That is a problem for me either.
I can't use before_save callback because I need to show the default value
on forms.
So, I have a date field and the default value is today, but when user open
the form, today must be on that field.
I'm setting this kind of default value on controller like
Hi,
I have ClassA, which has many objects of ClassB. Let's say that the
dependency of that relationship is of the destroy kind:
class ClassA ActiveRecord::Base
has_many :class_bs, :dependency = :destroy
end
class ClassB ActiveRecord::Base
belongs_to :class_a
end
Now let's say I
On Wednesday, September 5, 2012 3:53:50 PM UTC-3, Alexander Kurakin wrote:
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
This is relevant:
http://stackoverflow.com/questions/328525/what-is-the-best-way-to-set-default-values-in-activerecord
They mention using after_initialize.
Allen Madsen
http://www.allenmadsen.com
On Thu, Oct 18, 2012 at 8:50 AM, Gabriel Sobrinho
gabriel.sobri...@gmail.com wrote:
That is a
Using a after initialize does not respect if you set the attribute to
nil, like this:
Payment.new(:due_date = nil)
Also, it will mutate the already persisted objects if they are
persisted using a nil due date for example.
Another problem happens when you select specific attributes like:
On Oct 18, 2012, at 8:50 AM, Gabriel Sobrinho wrote:
That is a problem for me either.
I can't use before_save callback because I need to show the default value on
forms.
So, I have a date field and the default value is today, but when user open
the form, today must be on that field.
I like the idea of specifying it at the model level. this way you can pick
and choose.
On Monday, October 8, 2012 2:52:59 PM UTC-4, Abdelkader Boudih wrote:
On Sunday, 7 October 2012 01:16:17 UTC+1, Robert wrote:
By default with Rails, Postgres will return the id of a newly inserted
Pretty simple, I need to disable time zone conversion for specific columns.
I will handle any TZ conversion manually, but I need Rails 3 to forego
conversion in both writing and reading, and any AREL functions. But, I
don't want to disable the conversion for non-specified attributes.
I know
Just putting this out there before I make a pull request.
Is there any interest in an asset_url method as a view helper?
It would work by using the config.action_controller.asset_host if it exists
and prepending this to the results of asset_path.
I have found this necessary when writing html
You can read here:
https://github.com/FooBarWidget/default_value_for#when-not-to-use-default_value_for
среда, 17 октября 2012 г., 23:41:55 UTC+4 пользователь Zamith написал:
Isn't this just the same as having a before_save callback where you define
these default values?
Also, what do you
Is it possible to offset the damage from rails by writing your own attr
reader/writer?
Sent from my phone
On 2012-10-18, at 4:39 PM, Karl Smith threadh...@gmail.com wrote:
Pretty simple, I need to disable time zone conversion for specific columns. I
will handle any TZ conversion manually,
12 matches
Mail list logo