I can't really speak to the usefulness of this, but I think you'll meet
resistance due it being a breaking change.
HashWithIndifferentAccess allows other types of keys; it just doesn't
convert the key to string, as it does with symbols.
Current behavior:
hash = HashWithIndifferentAccess.new({"1"
Hi Philippe,
you should be able to use Rails' ability to pass in an array of classes,
and Ruby's parentheses to create a scope, to handle this scenario for you:
*<%= content_tag_for :tr, @model, class: ['foo', ('ready' if
@model.ready?)] do %>*
That should give you the same html response you exp
Hi Core List
The usual way to conditionally add classes to html tags is in the following
form:
This is hard to read and nod very convenient. ReactJS has an Addon to use a
Hash (Javascript Object) to conditionally add classes
(https://github.com/JedWatson/classnames).
Inspired by this I'
Hello, does ActiveRecord have support for postgres_fdw? If not, are there
plans to support foreign keys from tables within another database, provided
the application can connect to both databases?
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Core
So I noticed that hash with indifferent access is not indifferent to
integers as keys.
Currently this doesn't work.
hash = HashWithIndifferentAccess.new({"1" =>3})
hash[1] # => 3
The specific use case for me was passing around ids from the browser which
was necessary because the form was using
Thanks for sharing your thoughts on the Ctrl-P argument. I agree that code
should be first, and that we should not bend code just to adapt to its
supporting environment. I guess the bigger issues for long/short files are
readability and maintainability. But that's for another discussion :)
On Sat,