Upgrade delayed

I’ve stopped the upgrade for now. I ran into some issues on the new server and had to roll back. Everything is back to normal.

Posted in cl1p | Leave a comment

cl1p.net server upgrade

At 4:00 GMT cl1p is going down for a system upgrade. It should take 1 – 2 hours.

Posted in cl1p | Leave a comment

HTML Stripper

Long story short. I needed to quickly strip all HTML from a page I was working on. I searched for an HTML Stripper but only found code examples, not a functional web application.

So to help those in need of a simple HTML tag stripper, check out my HTML tag Stripper.

If folks to link to the HTML Stripper page that would be great. It will help other folks find it when they search.

Posted in Uncategorized | 1 Comment

Rob’s Reminders r7

Major:

Added a new action to the reminders controller.

I added a new method and view to my reminders controller to show completed items.

In Reminders Controller I added

def completed
@reminders = Reminder.find(:all, :conditions => [ "done = ? and user_id = ?", true, current_user.id])
end

I also added completed.html.erb to the views for reminders. However when I accessed the /reminders/completed url I got an error message.

ActiveRecord::RecordNotFound in RemindersController#show

WTF? Why is the error in show? Well after a half hour or cursing rails I figured it out.

In the routes.rb file you will see a line

map.resources :reminders

What this does is add mappings for index, edit, create, show. With everything other then index, edit, create assigned to show.

You have to add a mapping for your new method to get around this.

map.connect 'reminders/completed', :controller => 'reminders', :action => 'completed'
map.resources :reminders

Now you can try the completed method, and it will work.

Minor changes:

Changed title, added Calendar control to created reminders.

Also robsreminders.com is finally up and running. Thanks to dream host. They are now running rails 2.0.2, and where a ton of help. I recommend them if you are looking for a rails host.

Posted in Uncategorized | Leave a comment

Robs Reminders r4

Robs Reminders r4

Implement remember me.

I had forgotten to uncomment the remember me block of code in the /app/views/account/login.rhtml file. Removing this will allow users to skip the login process once they have successfully logged in once.

Change the date/time control

The current date time control is lousy. Fortunately there is a plugin that vastly improves it.

http://code.google.com/p/calendardateselect/

script/plugin install http://calendardateselect.googlecode.com/svn/tags/calendar_date_select

Add the following to the application.html.erb layout

<html xmlns=”http://www.w3.org/1999/xhtml” xml:lang=”en” lang=”en”>
<head>
<meta http-equiv=”content-type” content=”text/html;charset=UTF-8″ />
<title>Reminders: <%= controller.action_name %></title>
  <%=  javascript_include_tag ‘prototype’ %>
<%= calendar_date_select_includes nil %>

Edit the /app/views/reminders/edit.html.erb file

Change

<%= f.datetime_select :due %>

to

<%= f.calendar_date_select :due, :embedded => true, :time => true %>

A restart of the app server is required after updating.

Posted in Uncategorized | Leave a comment