Displaying 20 results from an estimated 20000 matches similar to: "Newbie Routing Question /site/1/edit vs. /site/edit/1"
2006 Aug 04
4
REST
I''ve been looking into RESTful approaches lately. Everything I know
my dog, Lelu, taught me.
REST (REpresentational State Transfer) is an architectural technique
for networked applications first described by Roy Fielding in his
dissertation at UC Irvine-- excellent work, especially considering
the tempting proximity of Newport Beach. As Lelu described it to me,
REST strives
2006 Jul 01
3
help me understand rest
I am having a heck of a time understanding the new rest craze in rails.
what I think I understand so far:
1 rest is about the way we use http to access information on the
internet.
2 http was created with nouns and verbs in mind, but the only verbs that
are supported in browsers and server software today are ''post'' and
''get''. Other useful verbs include put
2018 Jul 05
7
RFC: should we spell lambdas like functions?
I argue we should spell C++ lambdas (and other function-like variables) like functions, not like variables.
- Use verbs, not nouns.
- Use lowerCamelCase.
Here's a patch that implements the change to the coding standards:
https://reviews.llvm.org/D48991 <https://reviews.llvm.org/D48991>
Thoughts?
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
2007 Feb 20
1
Urls generated by nested map.resources
Hi,
Apologies if this has been answered before.
I have just started to try out the new RESTful routes. For resources
that aren''t related to anything else, everything makes sense - for
resources with relationships, I am less certain of what the "right"
thing to do - especially in relation to the urls produced, and how to
modify those urls.
For example, if I have teams and
2006 Jul 31
3
Simply_RESTful and Bulk Import URLs
Hi,
I have a people controller, and want to import bulk import multiple
people from a CSV file.
In my routes.rb file I have:
map.resource :person
Now, it''s a little unclear to me how to further configure the routes to
allow me to add the following URLs:
I need a URL to choose a file to upload, so I need an HTML ''frontend''
for it, so I figured the following URL
2007 Jul 06
1
Using nouns
Luke,
I thought about what you said about nouns, but having trouble coming up
with an example of what you mean.
Would you be willing to rework my example into the words your talking about?
I''m not asking for a solution here...this is more about how to think
about the problem being solved.
Mike B.
----------------------------------------------------------------
This message was sent
2018 Jul 06
2
RFC: should we spell lambdas like functions?
> On Jul 5, 2018, at 1:09 PM, Rui Ueyama via llvm-dev <llvm-dev at lists.llvm.org> wrote:
>
>> On Thu, Jul 5, 2018 at 12:57 PM Duncan P. N. Exon Smith <dexonsmith at apple.com> wrote:
>> I argue we should spell C++ lambdas (and other function-like variables) like functions, not like variables.
>>
>> - Use verbs, not nouns.
>
> I think I agree with
2014 Oct 13
16
[LLVMdev] RFC: variable names
I’d like to discuss revising the LLVM coding conventions to change the naming of variables to start with a lowercase letter. This should not be a discussion on the pain of such a transition, or how to get from here to there, but rather, if there is a better place to be.
My arguments for the change are:
1. No other popular C++ coding style uses capitalized variable names. For instance here
2018 Jul 10
2
RFC: should we spell lambdas like functions?
> On Jul. 5, 2018, at 18:12, Bruce Hoult via llvm-dev <llvm-dev at lists.llvm.org> wrote:
>
>
>
> On Thu, Jul 5, 2018 at 5:30 PM, Adrian Prantl via llvm-dev <llvm-dev at lists.llvm.org <mailto:llvm-dev at lists.llvm.org>> wrote:
>
>
> > On Jul 5, 2018, at 1:09 PM, Rui Ueyama via llvm-dev <llvm-dev at lists.llvm.org <mailto:llvm-dev at
2006 Aug 01
2
restful controllers - howto nest with link_to?
Hi List,
I''m trying to get my grip on the restful methods that are now part of edge
rails.
Making the first steps was impressive as well as easy because there are
already great resources on the blogs of early adopters:
http://www.ryandaigle.com/articles/2006/08/01/whats-new-in-edge-rails-simply-restful-support-and-how-to-use-itand
2007 Aug 06
2
Proposal: Pure Regex Router
So this has been an idea ever since Rails came out. Why not use a
pure regular expression router in similar fashion to gsub? I imagine
it working something like this:
Merb::Router.prepare do |r|
r.add %r[^/(.*)/(.*)/(\d+)$], :controller => ''\1'', :action =>
''\2'', :id => ''\3''
r.add %r[^/user-(\d+)$], :user_id =>
2008 May 04
5
simple Routing Error
Routing Error
No route matches "/user/register" with {:method=>:get}
The URL is http://localhost:3000/user/register
Here is app/views/user/register.rhtml
<h2>Register</h2>
<% form_for :user do |form| %>
<fieldset>
<legend>Enter Your Details</legend>
<div class="form_row">
<label
2006 Jun 12
4
Modelling: A table of domains
Greetings!
I''m thinking of setting up a table of "domains", consisting of the core
fields id, code, name, description, and type. Users is a domain, orders
is a domain, recipes is a domain, etc. Domain attributes other than
those covered by the core fields will go to, say, a user_other_fields
table, recipe_other_fields, etc. I see the advantage of having all
2007 Oct 01
3
How to beat Google aka Xapian & Natural Language Processing.
Xapians!
If tomorrow Xapian search engine would achieved the same performance
and result in searches as Google we would not be able to beat Google,
because we would create only a copy of the searches that already
exists from Google search engine. However there is a way to beat
anyone, and there is a way to beat Google successfully as well just do
not give up. Some see it as implementing Ajax, or
2007 Jul 06
2
Modifying a firewall
I''m trying to be able to use puppet to modify an existing firewall on a
web server.
The idea is that if I use puppet to do this, then if the machine ever
has to be rebuilt, aside from backups, I have a documented
configuration.
I looked at the module that was on the wiki that had a perl program and
what not, but I don''t think I''m clear on what my thinking should be
2010 Feb 20
23
Rails 3 possible bug in Routing
Hi, I just ran into this ActionController::RoutingError and just
wanted to check if someone can confirm this as a bug in the Rails 3
beta gem.
config/routes.rb contains:
get ''login'' => ''session#new''
post ''login'' => ''session#create'', :as => :login
GET /login works fine:
Started GET
2007 Sep 22
1
Testing RESTful routes
Hi all,
The app I am making right now uses restful routing entirely. I want to
prevent people from accessing my actions without the proper HTTP verb so
I commented out the :controller/:action/:id catch all routes that were
used in pre-RESTful Rails apps. Like so:
#map.connect '':controller/:action/:id.:format''
#map.connect '':controller/:action/:id''
2006 Nov 17
6
RESTful routes and resulting urls
if I have the following in my routes.rb:
map.resources :product_categories
it provides urls such as:
/product_categories
/product_categories/1
/product_categories/1;edit
etc.
and uses the ProductCategories controller.
how can I keep the same controller (and model) but set up the resources
so that I can have any abitrary url point to the existing controller,
much like specifying the controller
2008 Mar 07
4
n-levels of nested resources in REST?
Hi,
I find it would be very convenient to nest resources in two levels, so
a member is only sensible as a part of a club, and a fee pament is
only sensible in the context of a club and a member.
Is it possible to nest nested resources? How would the syntax be?
I have tried just nesting the assignment in routes.rb, but failed to
get it right
What do ou think? Is it possible?
/Fredrik
--
2010 Jun 02
5
user routing versus admin routing strategies?
In an app where ordinary users are limited to viewing and editing their
own "stuff", but someone with admin privs can view and edit anybody''s
stuff, what''s the right strategy for routing?
At first blush, I''d think that an ordinary user (e.g. with id 565)
should see something like:
http://example.com/mystuff.html
... where the controller assumes