-
Notifications
You must be signed in to change notification settings - Fork 118
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,3 +6,9 @@ | |
|
||
root :to => "spec#index" | ||
end | ||
|
||
Rails.application.routes.draw do | ||
This comment has been minimized.
Sorry, something went wrong. |
||
if Jasminerice.environments.include? Rails.env | ||
This comment has been minimized.
Sorry, something went wrong.
dnagir
Contributor
|
||
mount Jasminerice::Engine => "/jasmine" | ||
end | ||
end |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
require "jasminerice/engine" | ||
|
||
module Jasminerice | ||
mattr_accessor :environments | ||
self.environments = %w(development test) | ||
end |
1 comment
on commit ef4014d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dnagir, thanks for the comments - I agree with making the Gemfile the canonical place to declare environments for Jasminerice, so +1 to your changes.
I think it would be better to prepend it to the routes.
It will ensure the
/jasmine
always takes precedence over wider, common routes such as:match '/:action', :controller => 'pages', :as => :page
If a similar route exists, then
/jasmine
will never be accessible without modifying existing routes.I think it is reasonable to assume that
/jasmine
is the URL for Jasmine, not for a real page.