client_management/app/helpers/c_panel_helper.rb

13 lines
303 B
Ruby

module CPanelHelper
def do_first_time_run
sites = RegisteredSite.where(:admin_email => current_cpanel_user.email)
user = CPanelUser.find(current_cpanel_user.id)
sites.each do |site|
user.registered_site_ids << site.id
end
user.first_time_run = false
user.save
end
end