Hi,
Does anybody in here having experience with getting datebocks to work.
I have installed engines and datebocks-engines according to the
instructions on http://datebocks.inimit.com/
The error I get is this one:
Showing app/views/layouts/view.rhtml where line #7 raised:
undefined method `engine_javascript’ for #<#Class:0x480b50c:0x480b4e4>
undefined method `engine_javascript’ for #<#Class:0x480b50c:
7: <%= engine_javascript “datebocks_engine”, “calendar”,
Thanks,
–
Nathaniel Steven Henry Brown
Toll Free: 1-877-446-4647
Vancouver: 604-724-6624
– Ezra Z.
– Lead Rails Evangelist
– [email protected]
– Engine Y., Serious Rails Hosting
– (866) 518-YARD (9273)
Does someone have a copy of this plugin somewhere? I want to use this
(I’ve tried using the engines version and I get the same error as Kim
above…) but the link above seems to be dead.
Ezra Z. wrote:
Don’t know if you saw this but someone converted dateboks to be a
normal plugin with no engines depedency
The new release I put out has a ton of new features which the plugin
version will not have. Still not pleased that it attempted to get
forked (especially with the tone and intention that was communicated
by the announcement)… but what do ya say
I do think your plugin has a lot to offer and it is a great contribution
to the Rails community. I would consider using it on a per-project
basis.
Though, for now I am looking for a simple calendar picker that I can
easily customize its behavior. Also, I do need to have multiple
calendars
on the same view.
I don’t know enough about engines (reading it), but my initial thought
is a) avoid having more dependencies and b) if I can help it, avoid
bulking
up the application.
Falling short of re-inventing the wheel, I am open to other options.
…
easily customize its behavior. Also, I do need to have multiple
calendars
on the same view.
…
Long,
I use the old version “datebox_engine” and have multiple calendars on
the same view without any problems at all. You should be able to search
either this forum or the engines forum for the fix that I applied to
make it work (very, very simple). I thought Nathaniel added that
ability in the “datebocks” version but have not had a need to migrate to
it to find out.
All in all, I found the engine to be very easy to get up and running and
am greatly appreciative to Nathaniel for his work.
Personally I had so much trouble with DateBocks that I just
downloaded the Dynarch Javascript calendar and wrote a short helper
method to create a tag for it in views.
It was much quicker than trying to get DateBocks working correctly.
----- Original Message -----
From: “Ezra Z.” [email protected]
To: [email protected]
Sent: Saturday, February 24, 2007 9:54 PM
Subject: [Rails] Re: cannot get datebocks to work
Perhaps Nathaniel can integrate this with the new plugin. I believe it
is on his to-do list.
An aside question, can you explain the origin of EOL? Is this documented
somewhere, perhaps with Ruby doc?
– Long
Long,
I post on ruby-forum.com - but I did look up the link you displayed and
that looks like the right post that I was talking about. If you search
the engines forum at ruby-forum then I think I made some subsequent
posts as well.
I sent the patch to Nathaniel and I thought he put it in his latest
version…not sure why he wouldn’t have because it makes it so much more
useful (IMHO).
To answer your question about EOL - I have no idea. I’m sure it was
either in the code that I played with or it was in some other code that
I saw somewhere along the lines!
I am really not a very skilled ruby/rails developer at all. I managed
to get date_box working really quickly. In fact, it was quite simple to
go in and change to meet my needs (like the multiple calendars per
page). Not certain why so many posters here have had problems with it.
Maybe the datebocks is significantly different from date_box that I
used. Shortly after I made my original posts, I had at least three
people respond that got it up and running with the change as well.
Anyway, best of luck. I don’t monitor the forums very often (nor the
email account that the responses go to) so my apologies if I don’t
respond very quickly.
What errors did you have? Seeing as it’s an open source project
intended to help people, would be great if you were able to share what
broke, even if you didn’t fix it. I might be able to fix it on my end
for others at least.
The new version, Datetime Toolbocks has significant improvements.
Allowing you to be able to create multiple datetime toolbocks, as well
as having it use the value within the model itself.
The EOL abiqious name that is basically a stream input Start & end
phrase. It can really be whatever you want…
my_new_var = <<-ANYTHING
All the text within here can also have #{variables} and will not
matter whether there are “quotes”.
ANYTHING
I didn’t need to CIN to a variable, as the last variable/string
created within any method is the return value, which in this case is
used within the value.
The new version, Datetime Toolbocks has significant improvements.
Long,
somewhere, perhaps with Ruby doc?
I sent the patch to Nathaniel and I thought he put it in his latest
page). Not certain why so many posters here have had problems with it.
–
Posted via http://www.ruby-forum.com/.
I want to thank you both for sharing your insights here.
Nathaniel, I did see that the multiple datetime was a to-do item
on your project home page. Perhaps, it needs to be updated.
I thought the <<-EOL usage in the helper method was interesting.
It certainly makes cranking out html much easier, especially without
having to worry about quotes … so I learned something new today
Sorry to be negative about what you have put alot of work into.
My problems were mainly javascript errors I think as I finally got the
calendar to appear after running the rake javascript update task on
your webpage.
I still had the problem that the dates always displayed in the input
field as yyyy-mm-dd and I couldn’t figure out how to change it…
maybe I didn’t spend long enough!
Also all the phrase entries seem to be hard coded to American date
formats (ie enter 05/06 and it will assume mm/dd and again I couldn’t
see any way to change the defaults…
Finally there seems to be an awfull lot of stuff installed when you
install the plugin!
Here is what I use as a helper with the dynarch calendar:
It may not be the smartest way (I’ve only been playing with rails for
a month) but is seems to work :
module CalendarHelper
The following files are required to be able to use the calendar
popup:
public/stylesheets/calendar/*.css
public/javascripts/calendar/*.js
public/images/calendar/*.gif
In the section of the html (normally in the layout) you will