hanber-rails 0.0.8 → 0.0.9
Sign up to get free protection for your applications and to get access to all the features.
@@ -7,14 +7,14 @@ module Rails
|
|
7
7
|
module Generators
|
8
8
|
ResourceGenerator.class_eval do
|
9
9
|
def add_ember
|
10
|
-
say_status :invoke, "
|
10
|
+
say_status :invoke, "hanber:model", :white
|
11
11
|
with_padding do
|
12
|
-
invoke "
|
12
|
+
invoke "hanber:model"
|
13
13
|
end
|
14
14
|
|
15
15
|
say_status :invoke, "ember controller and view (singular)", :white
|
16
16
|
with_padding do
|
17
|
-
invoke "
|
17
|
+
invoke "hanber:view", [singular_name], :object => true
|
18
18
|
end
|
19
19
|
|
20
20
|
@_invocations[Ember::Generators::ControllerGenerator].delete "create_controller_files"
|
@@ -22,7 +22,7 @@ module Rails
|
|
22
22
|
|
23
23
|
say_status :invoke, "ember controller and view (plural)", :white
|
24
24
|
with_padding do
|
25
|
-
invoke "
|
25
|
+
invoke "hanber:view", [plural_name], :array => true
|
26
26
|
end
|
27
27
|
end
|
28
28
|
end
|
@@ -12,7 +12,7 @@ module Hanber
|
|
12
12
|
def create_view_files
|
13
13
|
template 'view.js', File.join('app/assets/javascripts/views', class_path, "#{file_name}_view.js")
|
14
14
|
template 'view.handlebars', File.join('app/assets/javascripts/templates', class_path, "#{file_name}.hjs")
|
15
|
-
invoke('
|
15
|
+
invoke('hanber:controller', [ file_name ], options)
|
16
16
|
end
|
17
17
|
|
18
18
|
end
|
data/lib/hanber/rails/engine.rb
CHANGED
@@ -12,9 +12,9 @@ module Hanber
|
|
12
12
|
|
13
13
|
initializer "ember_rails.setup", :group => :all do |app|
|
14
14
|
|
15
|
-
app.assets.register_engine '.handlebars',
|
16
|
-
app.assets.register_engine '.hbs',
|
17
|
-
app.assets.register_engine '.hjs',
|
15
|
+
app.assets.register_engine '.handlebars', Hanber::Handlebars::Template
|
16
|
+
app.assets.register_engine '.hbs', Hanber::Handlebars::Template
|
17
|
+
app.assets.register_engine '.hjs', Hanber::Handlebars::Template
|
18
18
|
end
|
19
19
|
end
|
20
20
|
end
|
data/lib/hanber/rails/version.rb
CHANGED