I'm using the friendly_id gem. I also have my routes nested:
# config/routes.rb
map.resources :users do |user|
user.resources :events
end
So I have URLs like /users/nfm/events/birthday-2009.
In my models, I want the event title to be scoped to the username, so that both nfm and mrmagoo can have events birthday-2009 without them bei...
How can I use friendly URLs on my Rails application ?
All I need is to make available the following url format
mysite.com/company1
mysite.com/user123
mysite.com/user1234
mysite.com/newton.garcia
mysite.com/company-name
Can anyone help ?
...
I am using freindly_id in my application. I have setup a few fixtures in my application. I want to do integration testing on them. During the tests I need the friendly_id, but the DB records created from fixtures do not have the corresponding slugs in the Slug table.
Aren't the slugs automatically created from Fixture data? If not then...
I have the URL
http://acme.example.com/view/view_container_content/15?javascript_disabled=true&container=aoeu
but I want it to look like
http://acme.example.com/view/container_name/content_name/
My models
Container has many sections
Section has many contents
and belongs to a Container
contents belong to a section
with frien...
Hi all,
I want to be able to use friendly_id in a catch all route to render the page that it fetches.
for example
http://localhost:3000/business would render controller "pages" action"show" with id "business"
without leaving the url above.
The aim of this is to avoid things like localhost:3000/pages/business and make shorter urls.
I ...
I'm using the friendly_id plugin to generate SEO-friendly URLS for some of my models.
Currently, I have a model with two attributes: name and display_name.
Essentially, display_name is preferred, but if it is blank, the model reverts to name. Friendly_id needs a field to base the URL off of:
Class Market < ActiveRecord::Base
has_fr...
Trying to integrate some friendly_id gem functionality on a controller method.
Essentially, I have a Market object, which has its URL created based on a custom method. Since it's based on a custom method, friendly_id won't update the URL when the Market object gets updated. Friendly_id does offer a redo_slugs rake task, but when I cal...
I use authlogic for authentication and certain actions require a logged in user, which is controlled via a before_filter like the following. I also use friendly_id on the User model and internally everything there is a look up on the User model there are queries to the friendly_id slug table too. This results in at least 3 queries for ce...