Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to perform other expense operations #10

Merged
merged 41 commits into from Oct 24, 2015

Commits on Oct 23, 2015

  1. Copy the full SHA
    71877ad View commit details
    Browse the repository at this point in the history
  2. Copy the full SHA
    55c78e0 View commit details
    Browse the repository at this point in the history
  3. Creates an expense in an idiomatically correct way

    - A new expense is created based on the association it has with a user
    boddhisattva committed Oct 23, 2015
    Copy the full SHA
    20a0cc5 View commit details
    Browse the repository at this point in the history
  4. Allows a user to see a list of expenses via datatables

    For loading all a user’s expenses we use the datatables gem via
    https://rails-assets.org/ because they help one better manage front end
    related dependencies.
    
    As part of installing the rails assets  datatables gem,
    rails-assets-jquery gem also gets installed. With this we remove the
    rails-query gem(to avoid having two duplicate gems serve the same
    purpose) and we also add the unobtrusive scripting adapter for jQuery
    namely jquery-ujs via rails-assets.org
    
    Other important points to note as part of this commit include:
    
    - A user logged into the system would see their expenses in the order of
    the most recently made expense(based on the actual expense date) and subsequent expenses that come thereafter
    boddhisattva committed Oct 23, 2015
    Copy the full SHA
    c680a95 View commit details
    Browse the repository at this point in the history
  5. Copy the full SHA
    308f5fd View commit details
    Browse the repository at this point in the history
  6. Copy the full SHA
    d0ff613 View commit details
    Browse the repository at this point in the history
  7. Copy the full SHA
    634edb3 View commit details
    Browse the repository at this point in the history
  8. Adds an FAQ page to the app along with a few miscellaneous fixes

    Misc fixes include
    - A fix to the contact page related spec description
    - A name related fix in the footer wrt who has worked on the app
    boddhisattva committed Oct 23, 2015
    Copy the full SHA
    5f52119 View commit details
    Browse the repository at this point in the history
  9. Copy the full SHA
    f9834a5 View commit details
    Browse the repository at this point in the history
  10. Copy the full SHA
    f53e20f View commit details
    Browse the repository at this point in the history
  11. Redirects a successful user signup to app home page

    Fixes failing specs with this change
    boddhisattva committed Oct 23, 2015
    Copy the full SHA
    adf9184 View commit details
    Browse the repository at this point in the history
  12. Copy the full SHA
    65484ef View commit details
    Browse the repository at this point in the history
  13. Displays user name as part of the welcome message

    This message is also displayed when a user has no expenses
    boddhisattva committed Oct 23, 2015
    Copy the full SHA
    7887151 View commit details
    Browse the repository at this point in the history
  14. Removes index display of user expenses

    This change is added because user expenses are now displayed on app
    home page. The index display of expenses is thereby no longer used.
    boddhisattva committed Oct 23, 2015
    Copy the full SHA
    15e612a View commit details
    Browse the repository at this point in the history
  15. removes extra whitespace

    boddhisattva committed Oct 23, 2015
    Copy the full SHA
    aab014c View commit details
    Browse the repository at this point in the history
  16. Copy the full SHA
    471b104 View commit details
    Browse the repository at this point in the history
  17. removes extra line

    boddhisattva committed Oct 23, 2015
    Copy the full SHA
    d092b96 View commit details
    Browse the repository at this point in the history
  18. adds an extra line between private scope and method under it

    This increases code readability
    boddhisattva committed Oct 23, 2015
    Copy the full SHA
    175f31b View commit details
    Browse the repository at this point in the history
  19. Copy the full SHA
    65ff89e View commit details
    Browse the repository at this point in the history
  20. Copy the full SHA
    b376228 View commit details
    Browse the repository at this point in the history
  21. Sorts the correct datatable column

    The datatable columns start with an index 0 and since we’re sorting the
    expenses based on the criteria that the most recently made
    expense(i.e., based on actual expense date) should show up first, hence
    this change is added to the appropriate column.
    boddhisattva committed Oct 23, 2015
    Copy the full SHA
    29ab0cd View commit details
    Browse the repository at this point in the history
  22. Disables datatables sorting for 'edit' and 'delete' columns

    Datatables provides sorting on all columns by default. Sorting wrt the
    ‘edit’ and ‘delete’ columns is of no use when displaying expenses and
    they’re hence removed.
    boddhisattva committed Oct 23, 2015
    Copy the full SHA
    e38004b View commit details
    Browse the repository at this point in the history
  23. Ensures that redirection is done at URI level

    This is basically because it’s an HTTP specification. One can read more
    on this on the link -
    https://viget.com/extend/rails-named-routes-path-vs-url
    boddhisattva committed Oct 23, 2015
    Copy the full SHA
    83cd2c7 View commit details
    Browse the repository at this point in the history
  24. Copy the full SHA
    616baad View commit details
    Browse the repository at this point in the history

Commits on Oct 24, 2015

  1. Copy the full SHA
    2db7206 View commit details
    Browse the repository at this point in the history
  2. Adds an expenses factory

    boddhisattva committed Oct 24, 2015
    Copy the full SHA
    8a54a54 View commit details
    Browse the repository at this point in the history
  3. Copy the full SHA
    686fc7d View commit details
    Browse the repository at this point in the history
  4. Copy the full SHA
    c83fd8b View commit details
    Browse the repository at this point in the history
  5. Adds a DB index to render the app homepage faster

    User expenses are displayed on app homepage. As the number of expenses
    grow in number this multiple key index(based on the user_id and the
    created_at) would help fetch that data from the table faster. For more
    details, one could consider referring the link -
    http://stackoverflow.com/questions/4445507/rails-created-at-when-user-fo
    r-ordering-should-you-add-an-index-to-the-table
    boddhisattva committed Oct 24, 2015
    Copy the full SHA
    f899056 View commit details
    Browse the repository at this point in the history
  6. Copy the full SHA
    861e01a View commit details
    Browse the repository at this point in the history
  7. Tests user association of an expense

    This test checks if the user association of an expense returns the
    correct user
    boddhisattva committed Oct 24, 2015
    Copy the full SHA
    af0f51e View commit details
    Browse the repository at this point in the history
  8. Copy the full SHA
    7f4d0f2 View commit details
    Browse the repository at this point in the history
  9. Copy the full SHA
    3a03059 View commit details
    Browse the repository at this point in the history
  10. Adds failing specs to check for an invalid expense name

    An expense name can be invalid if it is ‘nil’ or if it is an empty
    string. Both these use cases are addressed in this commit.
    boddhisattva committed Oct 24, 2015
    Copy the full SHA
    c41e436 View commit details
    Browse the repository at this point in the history
  11. Fixes failing spec wrt user sign in

    Wrt an earlier commit, a user sign in redirects to the application home
    page in which user name is not a title. Hence appropriate changes are
    made here.
    boddhisattva committed Oct 24, 2015
    Copy the full SHA
    8f34cb0 View commit details
    Browse the repository at this point in the history
  12. Uses scopes to retrieve most recent user expenses

    The advantage with using scopes is that they’re chainable. Also for one
    liners we needn’t really have to go in for a class method. This commit
    also makes the below changes -
    
    - Changes the method name to make it more expressive
    - Appropriate changes are introduced in other places that used the
    original class method
    boddhisattva committed Oct 24, 2015
    Copy the full SHA
    e9573df View commit details
    Browse the repository at this point in the history
  13. Tests that expenses feed is displayed in a particular order

    The user expenses feed is displayed on the home page in the order of
    the most recent first. This spec ensures that this  order is maintained.
    boddhisattva committed Oct 24, 2015
    Copy the full SHA
    e906a80 View commit details
    Browse the repository at this point in the history
  14. Copy the full SHA
    d7ce900 View commit details
    Browse the repository at this point in the history
  15. Uses "today's" date with time zone in mind

    People across the globe are in different time zones, it’s a nice thing
    that hound pointed to refer to a date in the context of these time
    zones in order to avoid unexpected behavior in the future.
    boddhisattva committed Oct 24, 2015
    Copy the full SHA
    7fb46e8 View commit details
    Browse the repository at this point in the history
  16. Copy the full SHA
    b49a944 View commit details
    Browse the repository at this point in the history
  17. Adds missing spacing between curly braces

    More spacing between the curly braces ensures better readability. Hence
    this is added.
    boddhisattva committed Oct 24, 2015
    Copy the full SHA
    e16378a View commit details
    Browse the repository at this point in the history