El Dorado

A full-stack community web application written in Ruby/Rails
Calendar, html.erb editor, small bug report « General « almost effortless
 
Wed, 06 May 2009, 02:55pm #1
Fearless Freep
Member
Registered: July 2008
Last visit: Tue, 02 Feb 2010
Posts: 29

Hi Trevor, I was wondering if there's any source of documentation for the built-in calendar you´re using. I've been trying to modify it to give a custom feel, but it seems very difficult to set individual properties for days - say to show one particular day highlighted or in a different color or such.

Also, does anyone have a lead on a simple editor, like, say FrontPage but that can be used with .html.erb files.

Finally, I came across this bug when entering a new Topic: Enter a title but no body (just leave it empty), then click to save. System gives error message, ´Posts is invalid´, and you cannot use the ´cancel´ link to exit.

Offline
Sat, 09 May 2009, 04:13am #2
Trevor
Administrator
Costco2
Registered: September 2005
Last visit: 16 hours ago
Posts: 370

I'm using this calender plugin, which I hacked up a little: http://github.com/topfunky/calendar_helper/tree...

I'm thinking of switching to this one, though: http://github.com/clemens/later_dude/tree/master

I'll see about that cancel link, but you are required to have something in the post field when you save the topic, so that's an expected error.

Offline
Tue, 12 May 2009, 01:07pm #3
Fearless Freep
Member
Registered: July 2008
Last visit: Tue, 02 Feb 2010
Posts: 29

I made this addition to the Topic class I found on the web, which allows you to make your own custom validations and error messages

class Topic < ActiveRecord::Base
validate do |Topic|
Topic errors_add_to_base("Body can´t be blank")
if Topic.body.blank?
end

But you still see the ´Posts can´t be blank´ message, and you still can´t cancel. I´ll keep looking.

Offline
Tue, 12 May 2009, 07:19pm #4
Trevor
Administrator
Costco2
Registered: September 2005
Last visit: 16 hours ago
Posts: 370

I think I've fixed the cancel link problem (see github), but I'm not sure what you need with the "post's can't be blank" message. Do you want to be able to make a topic without a post?

Offline
Wed, 13 May 2009, 10:08am #5
Fearless Freep
Member
Registered: July 2008
Last visit: Tue, 02 Feb 2010
Posts: 29

Thanks, I´ll put that fix in my version.

Thing is, I don´t want to see the Posts message: it´s a little generic, which is where that code I showed comes in handy since you can make custom error messages for each field.

Offline