removeDBcolsanddbparams

This commit is contained in:
yamin
2017-08-14 14:26:16 +06:30
parent c30d8f15d8
commit fa68bcff69
6 changed files with 12 additions and 34 deletions

View File

@@ -70,6 +70,6 @@ class PrintSettingsController < ApplicationController
# Never trust parameters from the scary internet, only allow the white list through. # Never trust parameters from the scary internet, only allow the white list through.
def print_setting_params def print_setting_params
params.require(:print_setting).permit(:name, :unique_code, :template, :db_name, :db_type, :db_username, :db_password, :printer_name, :api_settings, :page_width, :page_height, :print_copies,:precision,:delimiter,:heading_space) params.require(:print_setting).permit(:name, :unique_code, :template, :printer_name, :api_settings, :page_width, :page_height, :print_copies,:precision,:delimiter,:heading_space)
end end
end end

View File

@@ -122,11 +122,9 @@ class Ability
can :edit, :sale_edit can :edit, :sale_edit
can :item_void, :sale_edit can :item_void, :sale_edit
can :an :edit, :sale_edit
can :item_void, :sale_edit
can :item_edit, :sale_edit can :item_edit, :sale_edit
can :item_void_cancel, :sale_edit can :item_void_cancel, :sale_edit
can :cancel_all_void, :sale_edit can :cancel_all_void, :sale_edit
can :apply_void, :sale_edit can :apply_void, :sale_edit
can :overall_void, :void can :overall_void, :void

View File

@@ -5,10 +5,6 @@
<%= f.input :name %> <%= f.input :name %>
<%= f.input :unique_code %> <%= f.input :unique_code %>
<%= f.input :template %> <%= f.input :template %>
<%= f.input :db_name %>
<%= f.input :db_type %>
<%= f.input :db_username %>
<%= f.input :db_password %>
<%= f.input :printer_name %> <%= f.input :printer_name %>
<%= f.input :api_settings %> <%= f.input :api_settings %>
<%= f.input :page_width %> <%= f.input :page_width %>

View File

@@ -16,11 +16,7 @@
<tr> <tr>
<th>Name</th> <th>Name</th>
<th>Unique code</th> <th>Unique code</th>
<!--<th>Template</th> <th>Template</th>
<th>Db name</th>
<th>Db type</th>
<th>Db username</th>
<th>Db password</th> -->
<th>Printer name</th> <th>Printer name</th>
<th>Api settings</th> <th>Api settings</th>
<th>Page width</th> <th>Page width</th>
@@ -38,11 +34,7 @@
<tr> <tr>
<td><%= print_setting.name %></td> <td><%= print_setting.name %></td>
<td><%= print_setting.unique_code %></td> <td><%= print_setting.unique_code %></td>
<!--<td><%= print_setting.template %></td> <td><%= print_setting.template %></td>
<td><%= print_setting.db_name %></td>
<td><%= print_setting.db_type %></td>
<td><%= print_setting.db_username %></td>
<td><%= print_setting.db_password %></td> -->
<td><%= print_setting.printer_name %></td> <td><%= print_setting.printer_name %></td>
<td><%= print_setting.api_settings %></td> <td><%= print_setting.api_settings %></td>
<td><%= print_setting.page_width %></td> <td><%= print_setting.page_width %></td>

View File

@@ -29,22 +29,6 @@
<th>Template</th> <th>Template</th>
<td><%= @print_setting.template %></td> <td><%= @print_setting.template %></td>
</tr> </tr>
<tr>
<th>Db name</th>
<td><%= @print_setting.db_name %></td>
</tr>
<tr>
<th>Db type</th>
<td><%= @print_setting.db_type %></td>
</tr>
<tr>
<th>Db username</th>
<td><%= @print_setting.db_username %></td>
</tr>
<tr>
<th>Db password</th>
<td><%= @print_setting.db_password %></td>
</tr>
<tr> <tr>
<th>Printer name</th> <th>Printer name</th>
<td><%= @print_setting.printer_name %></td> <td><%= @print_setting.printer_name %></td>

View File

@@ -0,0 +1,8 @@
class RemoveDBcolsFromPrintSettings < ActiveRecord::Migration[5.1]
def change
remove_column :print_settings, :db_name, :string
remove_column :print_settings, :db_type, :string
remove_column :print_settings, :db_username, :string
remove_column :print_settings, :db_password, :string
end
end