fatfreecrm/fat_free_crm — pull request #261 by davidchua (2013-06-30 05:56:41+00:00)
Title: Fixed referencing error to FatFreeCRM::Version and rss/atom link exceptions on dashboard

On the latest ffcrm master branch:

Bug 1:

To replicate:
1. In your logged in state in the dashboard, click on the "RSS" link at the bottom of the page.
2. You should see a:

uninitialized constant FatFreeCRM::Version exception.

3. Similarly, this occurs when clicking on the "ATOM" link.

Bug 2:

After the bug fix on Bug 1:

1. Click on the "RSS" link at the bottom of the dashboard page again.
2. You should see a:

```ruby
undefined method `full_name' for nil:NilClass

10 @activities.each do |activity|
11 xml.item do
12 xml.author activity.user.full_name
13 # xml.guid activity.id
14 # xml.link nil
15 xml.pubDate activity.created_at.to_s(:rfc822)
16 xml.title activity_title(activity)
17 end
```

3. A similar error occurs when clicking on the "ATOM" link.

This is likely due to the RSS/ATOM view picking up activities that does not have a paper_trail 'whodunnit' attribute set. An example is when an activity is created when a user logs in and the system modifies the login_count.

An example of an activity that caused the original breakage of the above bugs:

```bash
=> #
```

This pull request attempts to fix the uninitalized constant exception by pointing to the correct constant "FatFreeCRM::VERSION::STRING" and the full_name breakage by changing to ensure that there's a user in the first place.

On a functional point, there is also no reason to display user login changes in rss/atom feeds.