Skip to content

Commit

Permalink
Added a script/rails to engine and form extensions' templates to allo…
Browse files Browse the repository at this point in the history
…w rails commands to work inside extensions.
  • Loading branch information
parndt committed Mar 29, 2012
1 parent 8dadf60 commit 1435f01
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
10 changes: 10 additions & 0 deletions core/lib/generators/refinery/engine/templates/script/rails
@@ -0,0 +1,10 @@
#!/usr/bin/env ruby
# This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.

ENGINE_PATH = File.expand_path('../..', __FILE__)
dummy_rails_path = File.expand_path('../../spec/dummy/script/rails', __FILE__)
if File.exist?(dummy_rails_path)
load dummy_rails_path
else
puts "Please first run 'rake refinery:testing:dummy_app' to create a dummy Refinery CMS application."
end
10 changes: 10 additions & 0 deletions core/lib/generators/refinery/form/templates/script/rails
@@ -0,0 +1,10 @@
#!/usr/bin/env ruby
# This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.

ENGINE_PATH = File.expand_path('../..', __FILE__)
dummy_rails_path = File.expand_path('../../spec/dummy/script/rails', __FILE__)
if File.exist?(dummy_rails_path)
load dummy_rails_path
else
puts "Please first run 'rake refinery:testing:dummy_app' to create a dummy Refinery CMS application."
end

0 comments on commit 1435f01

Please sign in to comment.