The exceptions ActiveRecord::RecordNotFound and ActionController::RoutingError
will give a 500 status in dev and test, but 404 in production.
This means you can't easily write JS to rely on 404 responses from Ajax
requests: it will work in production but not dev or test.
It might be sensible
Actually, RoutingError seems to do this already. I noticed the lack in
RecordNotFound, and incorrectly assumed RecordNotFound had the same problem.
So RoutingError gets it right, but maybe RecordNotFound should do the same?
On Wednesday, June 26, 2013 2:38:41 PM UTC+2, Henrik N wrote:
The
Currently, if I have a table that use Date format like this:
create_table claims, :force = true do |t|
t.date lodged_date
t.date status_date
t.datetime created_on
t.datetime modified_on
end
Then given I use '#where' to get a selected result like this:
hi all ,
I am unable to create ajax call in my rails app , any help ??
--
You received this message because you are subscribed to the Google Groups Ruby
on Rails: Core group.
To unsubscribe from this group and stop receiving emails from it, send an email
to
No, I for one don't. When you compare an integer and a float, you expect it to
compare based on the most precise type, not the least precise.
As you have shown below, you can't treat dates and times as the same thing, so
you need to use whichever one you mean in your code.
On 26/06/2013, at
While technically you could say that false is present, it would be
really unintuitive for most of the people as present? is supposed to be
just opposite of blank? and is used to check for truthiness. Additionally
present? is used in Rails app for a long time, so even if part of Rails
Core had
This list is the wrong forum, but try http://stackoverflow.com. Provide
more details about your problem there.
On Wednesday, June 26, 2013 11:34:14 AM UTC+2, hussainakhtar wahid wrote:
hi all ,
I am unable to create ajax call in my rails app , any help ??
--
You received this message
If you really must, you could e.g. define a method on invoice along the
lines of (untested)
def self.permitted_params
attribute_names - [user_id]
end
and then do
permit(*Invoice.permitted_params)
But like Brian said, whitelisting is more secure.
On Saturday, June 1, 2013 11:43:04 PM UTC+2,