Class: LesliAdmin::AccountService

Inherits:
Lesli::ApplicationLesliService
  • Object
show all
Defined in:
app/services/lesli_admin/account_service.rb

Instance Method Summary collapse

Instance Method Details

#showObject



35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# File 'app/services/lesli_admin/account_service.rb', line 35

def show 
     = Lesli::Account.left_joins(:detail)
    .where(:id => current_user..id)
    .select(:id, :email, :name, :status, :company_name_legal, :company_tagline)
    .first

    {
        id: .id,
        name: .name,
        email: .email,
        status: .status,
        detail_attributes: {
            company_name_legal: .company_name_legal,
            company_tagline: .company_tagline
        }
    }

    #current_user.account.joins(:detail)
end