Displaying 6 results from an estimated 6 matches for "add_class_nam".
Did you mean:
add_class_name
2006 Jul 27
9
Introspecting validates_presence_of
Hello people,
I''d like to detect whether an attribute of a model has
vaildates_presence_of applied to it so I can automatically apply a
mandatory (*) to the field...it doesn''t look easy...any ideas?
Cheers,
--
Dan Webb
http://www.danwebb.net
2006 Aug 07
5
RJS Change Background Color
What''s the page.method to change the background color of a DOM element? I''m
trying to change the background color of a couple of styled <li>''s when an
Ajax link is clicked.
Thanks,
David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060807/63de04bf/attachment.html
2007 Oct 25
0
specs for RJS
What''s the current best practice for spec''ing (and stubbing) RJS?
response.should have_rjs(*args, &block) from rspec_on_rails works well
for things that
assert_select_rjs supports. But for other things, like say
page[:elm].add_class_name :class_name, it''s not clear to me the best
way to test for this.
I''d love to be able to do something like
page[:elm].should_receive(:add_class_name).with(:class_name). Is this
possible to do?
Thanks! Rspec rocks!
-ben
2006 Apr 18
4
update_page yields escaped code in callback
...ax.Updater(''section'', ''/contacts'', {asynchronous:true,
evalScripts:true, onComplete:function(request){try {
$$("menu_tab").each(function(value, index) {
value.removeClassName("current");
});
$("contacts_tab").add_class_name = "current";
$("section").hide();
$("section").visualEffect("Appear", "{queue:
''end''}");
} catch (e) { alert(''RJS error:\n\n'' + e.toString());
alert(''$$(\&qu...
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
2006 Mar 31
5
RoR 1.1 RJS problem
I''ve been playing with the new RJS stuff in RoR1.1, and I have to say
that I''m am extremely impressed, NICE! work guys. However, I seem to be
having a bit of a problem. I promise, I''ve googled the hell out of it
and haven''t found an answer.
Set up: Putting together a little proof of concept app. Display a form
(index.rhtml) that just has a button to