Re: [ruby-81] RESTful services that always work

From: james a.
Sent on: Thursday, January 31, 2008 8:44 AM
I have 40 of the best Ruby on Rails people anywhere. 

;)

www.elctech.com

Seriously, we are a great fit for folks with defined and funded projects where they can't spend the time building a team themselves nor can they take the risk of hiring an unknown commodity. 

We of course need people too so maybe we can partner. 



--

Jim Ash

ELC Technologies
1921 State Street
Santa Barbara, CA 93101
[address removed]
(866)[masked] phn 
(415)[masked] mbl
(805)[masked] fax

[masked] Tel - London Office
[masked] Fax - London Office

http://www.elctec...­

-----Original Message-----
From: Georgina <[address removed]>

Date: Thu, 31 Jan[masked]:39:18 
To:[address removed]
Subject: RE: [ruby-81] RESTful services that always work


Hello guys/gals, 

Totally off topic but.... 

I'm a recruiter in the software marketplace, and several of my clients are looking for ruby on rails developers. So what I need is 1) a place to find great ruby developers or 2) need to know if anyone in this list is looking to make a move in career. Let me know thanks! 

| Georgina Paolino, Recruiter| BINC ? Professional Search / Software Marketplace | [address removed] | www.bincsearch.com |[masked] |
Connect to me on LinkedIn

-----Original Message-----
From: [address removed] [mailto:[address removed]] On Behalf Of stevenwulf
Sent: Thursday, January 31,[masked]:44 AM
To: [address removed]
Subject: Re: [ruby-81] RESTful services that always work



Hi Loqi,

Another option might be to make a generator to automate the creation of 
your routes.  I've been avoiding map.resource because of the 
plural/singular problem so I make my own routes:

  map.with_options(:co­ntroller => 'systems') do |s|
    s.systems         'systems',             :action => 'index'
    s.show_system     'systems/:id/show',    :action => 'show'
    s.new_system      'systems/new',         :action => 'new'
    s.create_system   'systems/create',      :action => 'create'
    s.edit_system     'systems/:id/edit',    :action => 'edit'
    s.update_system   'systems/:id/update'­,  :action => 'update'
    s.destroy_system  'systems/:id/destroy­', :action => 'destroy'
  end

This is a bit more tedious than map.resource, but if you create a route 
generator then it could make those routes for you.  There is a great 
railscast on using the generator framework within rails.

http://railscasts...­

In general, railscasts.com has a lot of really helpful stuff.


Regards,
-Steven


Loqi wrote:
> I'm beginning to get more comfortable with the idea of making a plugin 
> for pluralization-indepe­ndent Restful services. I'm just too green 
> with Rails to do it alone. I don't know how.
>
> I'm pretty sure everything the scaffold generator is producing is 
> sound. I have some inkling that the entire problem lies with the 
> map.resources method. But I can't quite find the exact failure. The 
> routes it produces seem to be named in a silly way, but I can't see 
> why those silly names don't work. Here's as far as I got:
>
>
> Routes generated by map.resources for an uncountable-noun-nam­ed model:
> fish_index     GET  /fish             {:controller=>"fi­sh", 
> :action=>"index"}­
> new_fish       GET  /fish/new         {:controller=>"fi­sh", 
> :action=>"new"}
> edit_fish      GET  /fish/:id/edit    {:controller=>"fi­sh", 
> :action=>"edit"}
> fish           GET  /fish/:id         {:controller=>"fi­sh", 
> :action=>"show"}
> . . .
> (This set crashes when you try to use the routes.)
>
>
> Pluralizing-noun-nam­ed models get this:
> carps          GET  /carps            {:controller=>"ca­rps", 
> :action=>"index"}­
> new_carp       GET  /carps/new        {:controller=>"ca­rps", 
> :action=>"new"}
> edit_carp      GET  /carps/:id/edit   {:controller=>"ca­rps", 
> :action=>"edit"}
> carp           GET  /carps/:id        {:controller=>"ca­rps", 
> :action=>"show"}
> . . .
> (This set is the regular Rails "convention over configuration" routes 
> that don't crash.)
>
>
> My fantasy is to generate RESTful conventions that are consistent, 
> non-subtle, and work every time, no matter what:
> fish_index     GET  /fish/index       {:controller=>"fi­sh", 
> :action=>"index"}­
> fish_new       GET  /fish/new         {:controller=>"fi­sh", 
> :action=>"new"}
> fish_edit      GET  /fish/edit/:id    {:controller=>"fi­sh", 
> :action=>"edit"}
> fish_show      GET  /fish/show/:id    {:controller=>"fi­sh", 
> :action=>"show"}
> . . .
> (This set doesn't exist, but probably should.)
>
>
> But I don't think the weird route names are actually the problem. I 
> don't yet know enough about Rails to find where it's falling on its 
> face. I tried the solution described here...
> http://somethingl...­ 
>
> ...where it says to provide an explicit or contrived singular noun to 
> the resources method call in routes.rb, like this:
> map.resources :fish, :singular => :fish_instance
> This would be a stopgap measure until I can do something more 
> satisfying, but I couldn't actually get it to work, and I'm not sure 
> why. I'll keep prodding at my personal problem until I find some good 
> workaround.
>
> Anyway, I'd like to fashion some kind of general plugin solution that 
> would help anyone (especially me) who wants to use RESTful Rails with 
> a declawed inflictor. It doesn't seem too difficult if you know how to 
> do it. But I guess nothing is difficult if you know how to do it.
>
> If some kind soul out there is willing to help this thing happen, I'd 
> be most grateful for some mentoring guidance while I puzzle it 
> through. Or maybe the other way around; If this is easy for an 
> experienced person to just do, I'd like to watch and learn. Please 
> contact me or this listserve if you can offer some help to a fellow 
> traveler in distress.
>
> Loqi
>
> And hey, thanks for the tip on The Rails Way, Rich. I'll look for that 
> one.
>
>
>
> -- 
> Please Note: If you hit "REPLY", your message will be sent to everyone 
> on this mailing list ([address removed])
> This message was sent by Loqi ([address removed]) from The East Bay Ruby 
> Meetup Group.
> To learn more about Loqi, visit his/her member profile: 
> http://ruby.meetu...­
> To unsubscribe or to update your mailing list settings, click here: 
> http://www.meetup...­
>
> Meetup.com Customer Service: [address removed]
> 632 Broadway New York NY 10012 USA
>





--
Please Note: If you hit "REPLY", your message will be sent to everyone on this mailing list ([address removed])
This message was sent by stevenwulf ([address removed]) from The East Bay Ruby Meetup Group.
To learn more about stevenwulf, visit his/her member profile: http://ruby.meetu...­
To unsubscribe or to update your mailing list settings, click here: http://www.meetup...­

Meetup.com Customer Service: [address removed]
632 Broadway New York NY 10012 USA


No virus found in this incoming message.
Checked by AVG Free Edition. 
Version:[masked] / Virus Database:[masked] - Release Date: 1/29/[masked]:00 AM
 

No virus found in this outgoing message.
Checked by AVG Free Edition. 
Version:[masked] / Virus Database:[masked] - Release Date: 1/29/[masked]:00 AM
 




--
Please Note: If you hit "REPLY", your message will be sent to everyone on this mailing list ([address removed])
This message was sent by Georgina ([address removed]) from The East Bay Ruby Meetup Group.
To learn more about Georgina, visit his/her member profile: http://ruby.meetu...­
To unsubscribe or to update your mailing list settings, click here: http://www.meetup...­

Meetup.com Customer Service: [address removed]
632 Broadway New York NY 10012 USA

Our Sponsors

People in this
Meetup are also in:

Sign up

Meetup members, Log in

By clicking "Sign up" or "Sign up using Facebook", you confirm that you accept our Terms of Service & Privacy Policy