Displaying 20 results from an estimated 500 matches similar to: "validates :boolean_field, presence: true misconceptions"
2012 Nov 10
6
Suggestion: `before_save on: :create` should either work or raise an exception
There''s a small inconsistency in ActiveRecord''s callback syntax that has
tripped me up before. It wouldn''t be a big deal, but it can lead to a
silent failure. I''d like to suggest that it either be made consistent or be
made to fail loudly.
The issue is that to do something before validating, but only when
creating, you use `before_validation on: :create`,
2012 Oct 18
3
#asset_url helper method
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 emails and needing a full url
path for assets. Since my CDN in the asset_host mirrors my assets in my
2012 Nov 15
2
Suggestion: use `select` values if `pluck` called with no args
I suggest that if you don''t pass any args to ActiveRecord#pluck, it would
use the select values. This follows along well with the way other
AR::Calculations work. As an extra benefit we would be able to pluck
virtual columns.
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group.
To view this discussion on the web visit
2012 Jul 09
10
attr_accessible on some properties + attr_protected on others makes class 'open-by-default'
(I posted this as a bug in GitHub
(https://github.com/rails/rails/issues/7018), but then someone there told
me I should post it here, so here it is.)
If you set attr_accessible on some properties in an ActiveRecord-descended
class, and then attr_protected on others - the class becomes ''default-open''
- if any properties are missed or added later, they will be accessible by
2012 Dec 14
1
Re: Digest for rubyonrails-core@googlegroups.com - 4 Messages in 3 Topics
This is a delivery failure notification message indicating that
an email you sent could not be delivered. The problem appears to be :
-- Recipient email server rejected the message
This condition occurred after 1 attempt(s) to deliver over
a period of 0 hour(s).
If you sent the email to multiple recipients, you will receive one
of these messages for each one which failed delivery, otherwise
2013 Apr 28
2
[ActiveSupport] Add a "remaining_to" method to date class
Just that:
class Date
> def remaining_to(date)
> if date.acts_like? :date
> date - self
> end
> end
>
alias :days_to
end
and then be able to do this:
Date.today.remaining_to(Date.parse ''2014-04-02'').days.seconds
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group.
To
2013 Jul 22
1
Dependency upon raised error/exception messages.
Hey everyone,
first of all, thank you for the tremendous work and effort on making Rails
more awesome every day.
I''ve brought up this "issue" on Github last Friday. [1] Steve Klabnik told
me to bring the discussion here, as it''s more appropriate.
The thing is, there is some amount of logic scattered around Rails (and its
tests) that depends upon error/exception
2013 Jul 10
4
Decoupling of ActionPack
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 this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group.
To
2006 Jun 21
3
validation help
I would like to validate a number within a certain range.
To first test that a entry is a valid number i use
validates_numericality_of :my_number, :message =>''sorry, not a number''
to test if the number is within a certain range i use
validates_inclusion of :my_number, :in => min..max, message => ''outside
range!''
If the numericality test fails, I
2006 Aug 19
3
Activerecord validation problems
Hi everyone,
I''m having trouble validating a model. The corresponding table has some
boolean columns:
create_table :permissions do |t|
t.column :project_id, :integer, :null => false
t.column :group_id, :integer, :null => false
t.column :read, :boolean, :null => false, :default => false
t.column :write, :boolean, :null => false, :default =>
2012 Apr 22
12
Xen doesn't boot on grub2 or xend doesn't start
hi guys,
It''s my first time here and in a mailing lists, I only participated in
forums before. Please, If I make a mistake you should advise me. Let''s go!
I was reading "xencommons not start" in a Remus Forum in order to install
Remus.
Well… I followed the tutorial <
http://remusha.wikidot.com/configuring-and-installing-remus>, I reboot in
xen_unstable and I had
2012 Apr 22
12
Xen doesn't boot on grub2 or xend doesn't start
hi guys,
It''s my first time here and in a mailing lists, I only participated in
forums before. Please, If I make a mistake you should advise me. Let''s go!
I was reading "xencommons not start" in a Remus Forum in order to install
Remus.
Well… I followed the tutorial <
http://remusha.wikidot.com/configuring-and-installing-remus>, I reboot in
xen_unstable and I had
2012 Oct 01
5
How to get the checkpoint size in remus code?
Hi,
I''m doing my master research and I need to adapt remus code. Now... I wanna
get the checkpoint size (memory + disk) on each period. Does someone know
what function does this? I think some *fd *object''s function in remus code
could just get the memory size.
Does someone help me?
Thanks
_______________________________________________
Xen-devel mailing list
2012 Aug 13
3
Backporting instructions in Contributing guide
I''m probably going to help backport some code from master onto 3.2, and the
suggested process in the Contributing guide doesn''t actually look like the
best approach to me. Wouldn''t it make more sense to just check out the
branch you want to patch, cherry-pick the change(s) from master, make any
additional commits necessary to get it working?
Not only is that simpler
2014 Mar 11
0
Rails 4.0.4.rc1 has been released!
Hi everyone,
I am happy to announce that Rails 4.0.4.rc1 has been released. This is a
bug fix release and
includes more than 290 commits.
If no regressions are found we will release 4.0.4 final this Friday, on
March 14, 2014.
If you find one, please open an Issue on GitHub and mention me
(@rafaelfranca) on it,
so that we can fix it before the final release.
## CHANGES since 4.0.3
To view the
2007 Jun 05
1
Puppet common misconceptions wiki page.
After stumbling merrily into the ''node inheritance variable override''
problem last night (see ''RFC: Changing variable override'' thread for
more info), it occurred to me that it would be useful to have a page in
the Wiki to describe common misconceptions of the way that the puppet
language and system works.
Are folk happy for this to be a separate page, or
2013 Oct 17
0
Rails 4.0.1.rc1 has been released!
Hi everyone,
I am happy to announce that Rails 4.0.1.rc1 has been released. This is
a bug fix release and
includes more than 450 commits.
This release comes up with an important change on how Active Record
handles subsequent `order` calls.
In Rails 4.0.0 when you do something like this:
```ruby
User.order("name asc").order("created_at desc")
```
The later called `order`
2006 Sep 18
1
Sorting Boolean fields
Hey there,
I came across this thread: http://www.ruby-forum.com/topic/78148#126235
where sorting in reverse by a boolean field wasn''t working properly. I''m
having the same issue now, but there''s not a reply in that thread. I was
wondering if anyone has figured this out yet?
Bascially, I want all the records with a "1" (true) to float to the top
of the
2013 Oct 30
0
Rails 4.0.1.rc4 has been released!
We found two regressions. One on Active Record and one on Action Pack.
Took some time to fix those issues so the release was delayed until today.
Here are the changes from 4.0.1.rc3 to 4.0.1.rc4:
https://github.com/rails/rails/compare/v4.0.1.rc3...v4.0.1.rc4
And the changes from 4.0.0 to 4.0.1:
https://github.com/rails/rails/compare/v4.0.0...v4.0.1.rc4
If we don''t hit any more
2009 Mar 17
1
initial value in 'vmmin' is not finite
Dear r helpers,
I'm trying to run the models of the BIOMOD package and got this message:
*
Error in nnet.default (x, y, w,...): **initial value in 'vmmin' is not finite*
What does this mean? and how can I correct it?
Thank you
*Andreia*
[[alternative HTML version deleted]]