[rails-oceania] Re: search engine friendly urls?

2010-11-01 Thread Bayan Khalili
class Product < AR::Base def to_param "#{self.id} #{self.name_or_other_string}".parameterize end end On Nov 2, 1:52 pm, Aymeric Gaurat-Apelli wrote: > Don't you need a dash? Is the space character enough? > > def to_param >    "#{id}*-*#{name_or_other_string}" >  end > > Cheers, > > Aymer

Re: [rails-oceania] Re: search engine friendly urls?

2010-11-01 Thread Aymeric Gaurat-Apelli
Don't you need a dash? Is the space character enough? def to_param "#{id}*-*#{name_or_other_string}" end Cheers, Aymeric On Tue, Nov 2, 2010 at 1:40 PM, Bayan Khalili wrote: > Hi, > > How about this? > > class Product < AR::Base > def to_param >"#{self.id} #{self.name_or_other_string

[rails-oceania] Re: search engine friendly urls?

2010-11-01 Thread Bayan Khalili
Ah crap, I forgot to add 'parameterize' to my code. Regards, Bayan On Nov 2, 8:38 am, Bodaniel Jeanes wrote: > Matt, > > This has always been easy in rails. All you have to do is define the > `to_param` method on your model. > > E.g. > > class Product < AR::Base >   def to_param >     "perhaps-p

[rails-oceania] Re: search engine friendly urls?

2010-11-01 Thread Bayan Khalili
Hi, How about this? class Product < AR::Base def to_param "#{self.id} #{self.name_or_other_string}" end end This way, you don't need to replace your controller code to cater for this, you still get to search on the index id field, and you don't run into duplicate values where 'name_or_ot

[rails-oceania] JOB - Full time Rails developer - Red Ant - Sydney

2010-11-01 Thread Ben Still
*Description of the job* We're looking for someone to join our team of Rails developers, and working alongside front end developers, designers, producers and content people. You'll be making things for the web and iphone. You'll be working on a variety of different projects - at any one time we usu

Re: [rails-oceania] search engine friendly urls?

2010-11-01 Thread Darcy Laycock
I'm a bit biased having written it, but I suggest checking out 'slugged' - http://github.com/Sutto/slugged. It's designed for rails 3 and higher out of the box (so it takes advantage of Arel where possible) and it supports a lot of the features I loved from friendly_id (e.g. slug history) whils

Re: [rails-oceania] search engine friendly urls?

2010-11-01 Thread Bodaniel Jeanes
Scratch that. I just saw in the readme that they suggest using StringEx if you want that and gave an example of using both together. [image: Bodaniel Jeanes] *Bodaniel Jeanes* [image: LinkedIn] [image: Twitter] [image: Tungle.me]

Re: [rails-oceania] search engine friendly urls?

2010-11-01 Thread Bodaniel Jeanes
Kirill, do you know how it stacks up to stringex in terms of the unicode support and intelligent symbol transliteration (% -> percent, $12 -> 12-dollars, etc)? Bo [image: Bodaniel Jeanes] *Bodaniel Jeanes* [image: LinkedIn] [image: Twitter]

Re: [rails-oceania] search engine friendly urls?

2010-11-01 Thread Kirill Radzikhovskyy
I use friendly_id http://github.com/norman/friendly_id # edit app/models/user.rb class User < ActiveRecord::Base has_friendly_id :name, :use_slug => true end User.create! :name => "Joe Schmoe" rails server GET http://0.0.0.0:3000/users/joe-schmoe On

Re: [rails-oceania] search engine friendly urls?

2010-11-01 Thread Bodaniel Jeanes
Hey that's nice! parameterize i think more or less does s/[^a-z0-9-]+/-/gi and maybe a few other things (like downcasing). Thanks for sharing that gem! [image: Bodaniel Jeanes] *Bodaniel Jeanes* [image: LinkedIn] [image: Twitter] [im

Re: [rails-oceania] search engine friendly urls?

2010-11-01 Thread Julio Cesar Ody
Not sure how it works on Rails 3, but I've been using the stringex gem for that for a while now. It has some cool features such as: rock & roll".to_url => "rock-and-roll" Check it out at http://github.com/rsl/stringex On Tue, Nov 2, 2010 at 8:38 AM, Bodaniel Jeanes wrote: > Matt, > > This

Re: [rails-oceania] search engine friendly urls?

2010-11-01 Thread Bodaniel Jeanes
Matt, This has always been easy in rails. All you have to do is define the `to_param` method on your model. E.g. class Product < AR::Base def to_param "perhaps-product-name-or-other-string" end end Usually you wouldn't arbitrarily return a string though. I usually have a column called "

Re: [rails-oceania] search engine friendly urls?

2010-11-01 Thread Ivan Vanderbyl
Take a look at permalink_fu Regards, Ivan Vanderbyl Sent from my iPhone On 02/11/2010, at 8:32 AM, Matthieu Stone wrote: > Hello, > > Anyone got any thoughts on the best way to generate search engine friendly > urls in a rails 3 app? > > ie: > > www.mysite.com/products/big-green-furry-thi

[rails-oceania] search engine friendly urls?

2010-11-01 Thread Matthieu Stone
Hello, Anyone got any thoughts on the best way to generate search engine friendly urls in a rails 3 app? ie: www.mysite.com/products/big-green-furry-thing instead of www.mysite.com/products/23 rgds, - matt. -- You received this message because you are subscribed to the Google Groups "Ruby

[rails-oceania] rorosyd is on next week! (call for speakers)

2010-11-01 Thread Jason Crane
Hey everyone, rorosyd is on next Tuesday, November 9 - but as yet we don't have anyone talking. If you want to do a talk, head on over to the wiki and fill in a slot. http://bit.ly/Wut7s On a side-note, we've had some interest in getting some small (and not so small) businesses in, to talk abo

[rails-oceania] JOB - Online Shop

2010-11-01 Thread quest4
We are looking to develop an simple e-commerce store into our existing rails site. The site already has a product database and login functionality. We are a healthcare and pharmaceutical company who are looking to sell certain products online. The company is located on the Gold Coast and the work

Re: [rails-oceania] Analog Blog and Jobs from Oct Melb Meetup

2010-11-01 Thread Paul Annesley
On Sat, Oct 30, 2010 at 2:21 PM, Xavier Shay wrote: >> job announcements, > > Sitepoint and friends - Paul > - Rails experienced people. Pretty much whatever you want. > - New stuff! > Mind if I elaborate? I'll be brief.. If you have solid Rails experience, know what's new in Rails 3, and want to

Re: [rails-oceania] Re: Analog Blog and Jobs from Oct Melb Meetup

2010-11-01 Thread Paul Annesley
On Sun, Oct 31, 2010 at 1:35 PM, glenn gillen wrote: > And following on from Xavier's talk on what makes a good README file, > I thought some might find Tom Preston-Werner's post a README Driven > Development interesting: > > http://tom.preston-werner.com/2010/08/23/readme-driven-development.html