Friendly urls for tracks
Don't use tracks ids in urls Add short_name to tracks and use that in urls as the identifier
This commit is contained in:
parent
882a1d20c9
commit
95fbd10153
9 changed files with 61 additions and 8 deletions
|
|
@ -3,6 +3,7 @@ FactoryGirl.define do
|
|||
name { Faker::Commerce.department(2, true) }
|
||||
description { Faker::Lorem.sentence }
|
||||
color { Faker::Color.hex_color }
|
||||
short_name { SecureRandom.urlsafe_base64(5) }
|
||||
program
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ feature Track do
|
|||
click_link 'New Track'
|
||||
|
||||
fill_in 'track_name', with: 'Distribution'
|
||||
fill_in 'track_short_name', with: 'Distribution'
|
||||
page.find('#track_color').set('#B94D4D')
|
||||
fill_in 'track_description', with: 'Events about our Linux distribution'
|
||||
click_button 'Create Track'
|
||||
|
|
@ -50,6 +51,7 @@ feature Track do
|
|||
click_link 'Edit'
|
||||
|
||||
fill_in 'track_name', with: 'Distribution'
|
||||
fill_in 'track_short_name', with: 'Distribution'
|
||||
page.find('#track_color').set('#B94D4D')
|
||||
fill_in 'track_description', with: 'Events about our Linux distribution'
|
||||
click_button 'Update Track'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue