This repository has been archived by the owner on Jul 6, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add rails 3.0 support, just copy the files over to the junk drawer
- Loading branch information
Showing
6 changed files
with
50 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1,9 +1,11 @@ | |||
require 'rails' | |||
|
|
||
module Backbone | module Backbone | ||
module Rails | module Rails | ||
|
if ::Rails.version < "3.1" | ||
class Engine < ::Rails::Engine | require 'backbone-rails/railtie' | ||
else | |||
require 'backbone-rails/engine' | |||
end | end | ||
|
|||
end | end | ||
end | end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,9 @@ | |||
require 'rails' | |||
|
|||
module Backbone | |||
module Rails | |||
class Engine < ::Rails::Engine | |||
end | |||
end | |||
end | |||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,19 @@ | |||
require 'rails/generators' | |||
|
|||
module Backbone | |||
class Install < ::Rails::Generators::Base | |||
JAVASCRIPTS = File.expand_path('../../../vendor/assets/javascripts', __FILE__) | |||
|
|||
def self.source_root | |||
@source_root ||= JAVASCRIPTS | |||
end | |||
|
|||
def copy_backbone | |||
Dir[File.join(JAVASCRIPTS, '*.js')].each do |file| | |||
file = File.split(file).last | |||
copy_file file, "public/javascripts/#{file}" | |||
end | |||
end | |||
end | |||
end | |||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,12 @@ | |||
require 'rails' | |||
|
|||
module Backbone | |||
module Rails | |||
class Railtie < ::Rails::Railtie | |||
generators do | |||
require 'backbone-rails/generators' | |||
end | |||
end | |||
end | |||
end | |||
|