>From a REST perspective, the URL is 100% irrelevant.
I havent tested it with analytics or anything, I'm pretty sure that
the number of people who go "oh, my form failed. I'd better see what
the URL is. Oh, /things!' How odd? I expect that to be a list?? What's
going on???' is zero.
/things works
I am fairly new to Rails and I am trying to understand the default routes
generated by resources in routes.rb
Is there a justification for having the default route generated by
resources for create as "/things"
POST /things(.:format) {:action=>"create",
:controller=>"thin
Take a look at ARel and Squeel gem. Squeel gem supports something like this
already.
On Wed, Aug 8, 2012 at 12:05 PM, Rafael Almeida wrote:
> Hello.
>
> Let's say I have the following schema
>
> People <---> people_services <---> services
>
> That is, people has a many-to-many relationship wi
Hello.
Let's say I have the following schema
People <---> people_services <---> services
That is, people has a many-to-many relationship with services. Say I want
to find all people who has services of types 1 and 2. How can we do it on
activerecord today?
My best solution so far is this
>>> But when using UUIDs, there is no reason to ask the database for a
>>> newly-inserted record's ID.
>>
>> There is if ActiveRecord uses it for a primary key.
>
> But ActiveRecord will have generated it, and given it to the DB to
> insert - the DB won't have generated it; so there's no need t
Just out of curiosity, do you have any examples of multiple extensions
where those other than the root extension aren't a compression or archive
format? I ask in the context of this being considered a bad practice. To
me, naming something anImage.jpg.zip.tar.gz means I started with a JPEG,
and
On 8 August 2012 14:33, Ken Collins wrote:
>
>> But when using UUIDs, there is no reason to ask the database for a
>> newly-inserted record's ID.
>
> There is if ActiveRecord uses it for a primary key.
But ActiveRecord will have generated it, and given it to the DB to
insert - the DB won't have
> But when using UUIDs, there is no reason to ask the database for a
> newly-inserted record's ID.
There is if ActiveRecord uses it for a primary key.
> Instead, the application can generate these UUIDs itself. This is, for
> example, what Hibernate and Mongoid do.
This is what my wiki articl
The only reason to ask the database for a newly-inserted record's ID, for
sequential numeric IDs, is because the database maintains the sequence and
only the database can get the next number in the sequence.
But when using UUIDs, there is no reason to ask the database for a
newly-inserted recor