diff --git a/app/models/table.rb b/app/models/table.rb index 7220a25407..0511edc0fa 100644 --- a/app/models/table.rb +++ b/app/models/table.rb @@ -115,6 +115,10 @@ class Table < Sequel::Model(:user_tables) save_changes end + def pending_to_save? + self.name =~ /^untitle_table/ + end + # TODO: use the database field def rows_counted owner.in_database do |user_database| diff --git a/app/views/admin/tables/show.html.erb b/app/views/admin/tables/show.html.erb index d5d1acff31..efaa349a9e 100644 --- a/app/views/admin/tables/show.html.erb +++ b/app/views/admin/tables/show.html.erb @@ -10,7 +10,13 @@
<%= table_privacy_text(@table) %>
++ <% if @table.pending_to_save? %> + SAVE + <% else %> + <%= table_privacy_text(@table) %> + <% end %> +