Two small updates have been added in the last week. We added a link to the “manage groups” which seems to have been lost in the upgrade. And we also added a “Table of Contents” function to notes. How it works is if your note has more then 3 h1. tags (header) then it will automatically create a table of contents which you can click to jump to each section in the top right corner. Screenshots say it all:
So all day today NoteSake has been undergoing changes. We upgraded some stuff on the server end to make things more speedy for all our notetakers. We also added a “remember me” function which will keep you logged in even after you close the browser.
Fun fun all around.
We have had some recent downtime due to server issues.
We did not lose anything, hopefully everything is fixed now.
Sorry for any inconvenience.
Shell Script to Generate Edge Rails Project
Published December 30, 2007 Uncategorized Leave a CommentThis is a basic shell script to generate a truly edge rails project. It will also install some plugins which I use (rspec, rspec on rails and exception notification). Note this uses mysql for its database, remove –database=mysql from the project generation.
Use this by saving it and running chmod +x path/to/file to make it executable, then /path/to/file newprojectname the same way you generate any other rails project.
You can find it here
A lot has been going on behind the scenes at NoteSake since our launch earlier this year. We are now in the midst of our first major build and are excited about the new features we will be offering. Coming January 2008, NoteSake.com will offer some features that we had always wanted to include, but steered clear of until we had them laid out perfectly. We are so excited about these changes that we would like to give our users the opportunity to check out the new features before the build is actually finalized. We are officially opening our staging site to the public: http://humpty.notesake.com. Aside from granting a sneak peak of the new site, the development team at NoteSake is looking for feedback and criticism from our dedicated users. Your opinion is respected and appreciated, so do not hesitate to tell us what you think.
Upon arriving at the Humpty site, there are two options for logging in: a new user account can be created or a user may visit only as a guest. It is preferred that a new account be created, but if you would rather not, simply input “guest” for both the user ID and password. The guest account is restricted from saving any data, so it may be in your best interest to create a new account.
As it is, NoteSake.com is pretty, but fails to leave the developers much room to conveniently make additions to the experience. To accommodate the need to implement changes that are made, a new design has been formulated. Once you have logged in to the staging site, you will notice this new design immediately. Most notably, the toolbar is on the left hand side, with expanding and collapsing sub-menus.
The group features of the site are undergoing major changes that will streamline the collaborative effort even more so than before. We have always tried to focus on the communal aspect of learning and are looking to expand upon this by opening up the note sharing system. Passing notes will no longer be confined to one, individual recipient. We are implementing a feature that will allow sharing notes with up to ten users per half hour through email. Additionally, we have opted to include non-account holders as possible recipients.
Another group feature we are working on is an RSS feed option. This feature applies strictly to group collaborations. When deadlines are approaching and a given group is working frantically to tie up loose ends, we realize waiting for an update from a contributor can be nerve-wracking. Rather than logging in and refreshing your NoteSake account every five minutes, the updates will arrive at your RSS reader as soon as a group note is updated. The RSS feed feature cuts out time wasted on waiting for communication about who has done what. On the downside, you can no longer blame a shoddy project on a member who failed to stay in touch with the rest of the group.
The editing system has always needed work. A great deal of progress has been made in this respect for the upcoming build, and we guarantee you will like what we have done. An evolved revision viewer has been comprised for the build. Various versions of notes can even be compared between each other, showing changes between revisions. In clicking on “View Revisions,” a prompt will load to choose any version of a given note. On the left hand tool bar, you will then see an option to compare the note with another edit. From there, the text will be marked with highlights pointing out the changes that were made between versions. The viewer will be beneficial to any user, but is especially useful when applied to group notes. At current, the viewer will store only up to the six latest versions of your note, but it’s a start.
Be forewarned: there is no guarantee that your notes will save properly, and they may be erased at any given time. This is a staging site, after all. We are opening up the staging site to our users because we want your input. We understand that the standard semester is coming to a close and there won’t be much need for note taking. Think of becoming familiar with our test site as an intersession course without a grade. With the more feedback we receive, the better the site will be when we finalize the changes that will be made. Let us know what you think about the new format, both good and bad. Any questions or comments should be directed to: info@notesake.com.
We look forward to your feedback, and hope we can cater to your needs and opinions. Good luck with the approaching term papers and exams.
Thank you,
The NoteSake Team
Access current user in models
Published November 28, 2007 Rails Leave a CommentTags: activerecord, activesupport, Rails
So I recently have been working on something for NoteSake that requires me to access the current logged in user in a model. The problem with this is that it is saved in a session which is then gotten in a before_filter in the controllers. We all know you can’t access session’s in models (and even if you could it really is just not very lady like).
So I searched and I scrounged and I hunted. And then I found this little gem on the rails wiki. It describes how to add a created_by and updated_by column to your tables. It is full of activerecord goodness so I would definatly suggest taking a look.
Anyways here is the short and easy way to do this. It is also pretty nice and DRY (we all love keywords right?).
In this example I am using the code from NoteSake which stores the current_user in the User model. This can be done with anything though.
So first off lets let make it so we can hold this in the model
Here we do something tricky. We use cattr_accessor instead of its well known brother attr_accessor. What this does is create a attribute which is accessable to the entire class. It is implemented in ActiveSupport.
Okay so nothing that magical so far. Now we need to put the current user into here. In order to do this all we have to do is put a filter in our application controller which will put the user into the User.current_user. This is easy enough, and I threw it into my authorize filter.
Now we can access the currently logged in user by simply saying User.current_user. This can be used in any of the models, and makes life all around easier.
Next time ill tell yall how to use this with acts_as_versioned.
In preperation for upcoming updates, we have moved blog locations. Now we are located on wordpress. It seemed wastefull to spend resources hosting/debugging a blog when we could just do it for free using wordpress.
So here it is.
Updates will be coming in, and so will rails porn.

