class Ng::Generators::ShowGenerator
Public Instance Methods
route()
click to toggle source
# File lib/generators/ng/show/show_generator.rb, line 13 def route inject_into_file 'app/assets/javascripts/ng/routes.coffee', after: "$stateProvider\n" do " .state '#{ng_singular_name}',\n"\ " controller: '#{class_name}Ctrl'\n"\ " url: '/#{plural_name}/:id'\n"\ " templateUrl: '#{plural_name}/show.html'\n\n" end end
show()
click to toggle source
# File lib/generators/ng/show/show_generator.rb, line 8 def show template 'show.html', "app/assets/templates/#{plural_name}/show.html" template 'show_ctrl.coffee', "app/assets/javascripts/ng/controllers/#{singular_name}_ctrl.coffee" end