Displaying 20 results from an estimated 500 matches similar to: "Unobtrusive Javascript for Rails"
2006 Jun 05
1
Unobtrusive javascript...what if?
What if...you could produce accessible, unobtrusive javascript, using
Rails built-in javascript/prototype helpers, with just one extra line
of code in your layout, a plugin, and one small enhancement to the
helpers. Something like this:
[php]
<% form_remote_tag :controller => ''foo'', :action => ''bar'',
:unobtrusive => true %>
# which produces
2006 Aug 01
0
Unobtrusive Javascript for Rails 0.2
Dan Webb (http://www.vivabit.com) and I are happy to announce the
latest release of the Unobtrusive Javascript plugin for Rails. This
release packs in lots of cool new features, a few changes to old ones
and some performance enhancements.
Now you can write your behaviours in Ruby, attach behaviours directly
to elements using content_tag and apply behaviours to elements
without HTML IDs.
2006 Jul 21
3
Unobtrusive Javascript plugin
Hi,
I downloaded the unobtrusive_javascript pluing from this link
(http://www.lukeredpath.co.uk/index.php/2006/06/06/introducing-unobtrusive-javascript-for-rails/)
since I needed to have dynamic content in javascript (for a pop-up
menu).
Unfortunately I have been unable to make the plugin work. I followed the
instructions on the website, but for some reason the javascript doesn?t
work (for
2006 Jul 07
2
Testing views with Hpricot
assert_tag smells bad. Hpricot smells nice (apricotty!).
Testing your views with Hpricot:
http://www.lukeredpath.co.uk/index.php/2006/07/07/testing-your-rails-
views-with-hpricot/
Big thanks to _why for a great little library!
Feedback is appreciated. rSpec integration coming soon (hopefully!).
Cheers,
Luke Redpath
contact@lukeredpath.co.uk
-------------- next part --------------
An HTML
2006 Jun 29
2
Random routing errors in 1.1.3 with Mongrel
Since upgrading to 1.1.3 on our dev box, we''ve started to see random
routing errors with our apps running under Mongrel in production
mode. The errors seem to go away after a while but come back
everytime we restart the server. This may be a mongrel problem, it
may be a rails problem (I''ve posted a bug on the trac) and I was
wondering if anybody else had had similar
2006 Jun 29
6
Naming Convention for Controllers?
Hello!
I just read DHH''s presentation pdf.
In his examples, he wrote PeopleController instead of PersonController.
I''ve been using singular words in controller''s name.
Which is more common?
Thanks.
Sam
--
Posted via http://www.ruby-forum.com/.
2006 Mar 05
7
whatever happend to unobtrusive javascript in Rails ?
Don''t get me wrong, JavaScript/Ajax helpers in Rails are a huge
timesaver and they have helped me to finally overcome my irrational
aversion to js libraries like prototype and such. However, all this
goodness seems to come at quiet a price. The resulting code is
littered with inline JS, including ubiquitous script tags and onload
attributes etc.. It seems that just when i found
2007 Apr 09
0
Unobtrusive IPE -- comments, please
I just coded an unobtrusive In Place Editor and wanted to get some
review and comments for it. Anyone spot anything obvious that I could
do to streamline this?
Thanks,
Walter
<script type="text/javascript" charset="utf-8">
var rightClick = function(e){
Event.stop(e);
var editListing = new Ajax.InPlaceEditor("listing_body",
2007 Mar 14
0
SV: Re: each() and parameters and unobtrusive javascript
You could also try to go with the button element since it can wrap content like images. Something like:
<button name="delete"><img src="..."></button>
along with some styling to your liking.
-Tobias
-----Oprindelig meddelelse-----
Fra: rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org [mailto:rubyonrails-spinoffs@googlegroups.com] På vegne af
2006 Feb 21
26
Net::SMS::BulkSMS 0.1
This is the first release of a new Ruby library for the
www.bulksms.co.ukAPI which should allow simple integration of SMS
functionality into your
Ruby or Rails apps.
Sending a message is as simple as:
@service = Service.new(''username'', ''password'')
@service.send_message(''This is my message!'', ''4479123456789'')
# whats my
2006 May 09
3
validations erasing the form
Hi there
I have a for with a couple of text_fields. I''m doing some validation
via the model and when the validation "works" I get there was an error
on blah blah
the problem is the form is erased and I have to fill up the form again!
I saw that scaffold keeps the form filled when the validation "works"
but I dont know exactly what''s making it happen!
I would
2006 May 09
5
Solaris migration error:Lost connection to MySQL server
We have installed rails 1.1.2 and Ruby 1.8.4 on solaris. When we attempt
to
run the initial migration we get the following error:
Mysql::Error: Lost connection to MySQL server during query: SELECT
version FROM schema_info
/web/server/pkgs/ruby-1.8.4/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/connection_adapters/abstract_adapter.rb:120:in
`log''
2006 Mar 03
3
embedding a forum inside a rails app
what is the best way to embed a forum (phpbb is currently installed under
/public/forums/) inside my layout ? I dont want the foum to be its own page
i would like it to appear inside the main part of the page with navigation
and border in tact. is this possible with the current way it is installed ?
thanks
adam
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
2008 Mar 03
2
stuck on testing validation
Hello,
I must be doing something dumb, but here it goes...
why does this work?
before(:each) do
@work = Work.new
end
#for testing validates_presence_of :title
it "should require a title" do
@work.title = nil
@work.should_not be_valid
end
while this doesn''t:
def valid_work_attributes
{
:title => "guernica",
:description
2005 Jun 29
14
Unobtrusive scripting?
Currently, pages generated by Rails tend to be sprinkled with
JavaScript. This happens, because the various helper methods work only
locally and simply append to the output.
In order to hide the JavaScript away, rendering would probably have to
be changed. A way I can think of is that a page-specific script is
included in the head of the document and JavaScript code is not written
to the
2006 Jan 28
13
What''s the verb form of id?
Random question:
I''ve written a method for the String class that turns an arbitrary
line of text in to an identifier, e.g.:
"My, what a beautiful day!"
=> "my_what_a_beautiful_day"
"(anb*#NF(AMNV"
=> "anb_NF_AMNV"
We''ve got all these great names already like underscore, classify,
titleize and things like that. I''d
2006 Feb 22
2
sudo in switchtower and security
I''m attempting to deploy a rails application using switchtower. My IT guys
are refusing to give me sudo for a user changeable script. I really can''t
argue with their logic. If I have sudo for a script that I can update, well,
I can do most anything I want.
They are suggesting I create a cgi that performs the same function. Since
the cgi would run as www-data (this is a debian
2007 Oct 26
3
Specing with Subdomains as Account Keys
How do you go about implementing and rspecing subdomains as account
keys? I''m sure that this must be an issues for others as well.
So I have an app using subdomains as account keys. The Application
Controller sets up @current_company in a before filter. Everything is
done within the context of the @current_company.
After reading about Demeter''s Revenge
2006 Aug 03
2
Plugins dependency mechanism?
Hi,
With so many good plugins around at the moment, I''d perhaps like to require
some of these in one of my own rather than try to re-write their
functionality.
Is there a mechanism available for making a plugin dependent on another
plugin(s)?
Cheers
Dan
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
2006 Feb 23
5
Web/HTTP Testing
Hello,
I am looking for a user test automation tool. When I say ''user'', I
mean it should mimic the user interacting with the app. That
ultimately boils down to a tool that drives a browser or is able to
make http requests and allow us to deal easily with the responses.
Our requirements are to be able to write the tests in Ruby (no need to
switch to other language for test