class JeraPush::ViewsGenerator

Public Instance Methods

copy_kaminari() click to toggle source
# File lib/generators/jera_push/views_generator.rb, line 31
def copy_kaminari
  kaminari_path = 'kaminari'
  copy_file "#{kaminari_path}/_gap.html.erb", "app/views/#{kaminari_path}/_gap.html.erb"
  copy_file "#{kaminari_path}/_next_page.html.erb", "app/views/#{kaminari_path}/_next_page.html.erb"
  copy_file "#{kaminari_path}/_page.html.erb", "app/views/#{kaminari_path}/_page.html.erb"
  copy_file "#{kaminari_path}/_paginator.html.erb", "app/views/#{kaminari_path}/_paginator.html.erb"
  copy_file "#{kaminari_path}/_prev_page.html.erb", "app/views/#{kaminari_path}/_prev_page.html.erb"
end
copy_layout() click to toggle source
# File lib/generators/jera_push/views_generator.rb, line 26
def copy_layout
  copy_file 'layouts/jera_push/jera_push.html.erb', 'app/views/layouts/jera_push/jera_push.html.erb'
  copy_file 'layouts/jera_push/_navbar.html.erb', 'app/views/layouts/jera_push/_navbar.html.erb'
end
copy_views() click to toggle source
# File lib/generators/jera_push/views_generator.rb, line 8
def copy_views
  copy_file message_view_path('_message_attributes.html.erb'), "app/views/#{message_view_path('_message_attributes.html.erb')}"
  copy_file message_view_path('_message_device.html.erb'), "app/views/#{message_view_path('_message_device.html.erb')}"
  copy_file message_view_path('_new.js.erb'), "app/views/#{message_view_path('_new.js.erb')}"
  copy_file message_view_path('device_filter.js.erb'), "app/views/#{message_view_path('device_filter.js.erb')}"
  copy_file message_view_path('index.html.erb'), "app/views/#{message_view_path('index.html.erb')}"
  copy_file message_view_path('message_devices_filter.js.erb'), "app/views/#{message_view_path('message_devices_filter.js.erb')}"
  copy_file message_view_path('new.html.erb'), "app/views/#{message_view_path('new.html.erb')}"
  copy_file message_view_path('show.html.erb'), "app/views/#{message_view_path('show.html.erb')}"


  copy_file device_view_path('_checkbox_list.html.erb'), "app/views/#{device_view_path('_checkbox_list.html.erb')}"
  copy_file device_view_path('_filter.html.erb'), "app/views/#{device_view_path('_filter.html.erb')}"
  copy_file device_view_path('_list.html.erb'), "app/views/#{device_view_path('_list.html.erb')}"
  copy_file device_view_path('index.html.erb'), "app/views/#{device_view_path('index.html.erb')}"
  copy_file device_view_path('index.js.erb'), "app/views/#{device_view_path('index.js.erb')}"
end

Protected Instance Methods

admin_path() click to toggle source
# File lib/generators/jera_push/views_generator.rb, line 43
def admin_path
  "jera_push/admin"
end
device_view_path(file_name) click to toggle source
# File lib/generators/jera_push/views_generator.rb, line 51
def device_view_path file_name
  "#{admin_path}/devices/#{file_name}"
end
message_view_path(file_name) click to toggle source
# File lib/generators/jera_push/views_generator.rb, line 47
def message_view_path file_name
  "#{admin_path}/messages/#{file_name}"
end