lipsiadmin_generators/pdf/pdf_generator.rb in lipsiadmin-5.1.6 vs lipsiadmin_generators/pdf/pdf_generator.rb in lipsiadmin-5.1.7
- old
+ new
@@ -2,11 +2,11 @@
def initialize(runtime_args, runtime_options = {})
runtime_args = ["pdf"].concat(runtime_args) # Skip usage
super
usage if runtime_args.size == 1
end
-
+
def manifest
record do |m|
# Copy Stylesheets
m.create_all("stylesheets", "public/stylesheets")
@@ -16,32 +16,32 @@
# View template for each action.
actions.each do |action|
m.template 'view.html.haml', "app/views/pdf/#{action}.html.haml",
:assigns => { :action => action }
end
-
+
m.puts remember
end
end
protected
def banner
"Usage: #{$0} pdf action"
end
-
+
def remember
<<-MESSAGE
==============================================================================================
Please remember to add in your controller(s) some like:
-
-#{actions.collect { |a|
+
+#{actions.collect { |a|
" def generate_pdf_#{a}
render_pdf :#{a}, '#{a}_file.pdf'
end" }.join("\n\n")}
==============================================================================================
MESSAGE
- end
-end
\ No newline at end of file
+ end
+end