similar to: SOMEONE HAS TO KNOW HOW TO DO THIS

Displaying 20 results from an estimated 20000 matches similar to: "SOMEONE HAS TO KNOW HOW TO DO THIS"

2006 Aug 14
4
Updating a table with Ajax
I''ve been banging my head against the wall trying to update a table (add/delete rows) using Ajax. It seems simple enough but just doesn''t work for me. I can get it to work using DIVs instead of a table, but doing the layout with DIVs is much more cumbersome and I know it works for others with a table (though I haven''t been able to find an exact example code anywhere).
2006 Feb 18
5
Date formatting error
Hi All, I''m a bit stumped. All I''m trying to do is format a date and I get an error. Details below. I have a partial to list all "notes" associated with a "client" with the following code. <% for note in @client.notes %> <hr /> <%=h note.note_text %> Posted on <%=h note.created_at.strftime("%I:%M") %> by <%=h
2006 Apr 07
3
Ajax render a template
In my blog a user can add comments. I want an Ajax call to add the comment to the bottom of the comments list. How to i return a comment thats is in the comment template and add it to the bottom of the page. I have gotten as far as rendering some text back to the form and the comment doesn''t display until i refresh. This is my _newcomment.rhtml form to create a new comment <div
2006 Jun 14
5
display formatted date
Hi, In my form I have date field set as ''datetime_select'' which is fine as I wanted it in the same format. But while displaying (list action) it displays date in long format i.e. ''Tue May 30 15:39:00 Central Daylight Time 2006''. How can I format it so that it will just be diaplyed as ''dd/mm/yyyy'' format? Thanks -- Posted via
2007 Oct 05
13
spec''ing view render partial collection, local variable not found
I''m trying to spec out a render partial collection but I get the following error 2) NoMethodError in ''/games/_game.rhtml should show game name'' undefined method `body'' for #<#<Class:0x316580c>:0x2f1154c> /Volumes/EXTERNAL/web/omenking.ca/vendor/plugins/rspec_on_rails/lib/spec/rails/matchers/have_text.rb:12:in `matches?''
2006 Jul 26
8
change text_field_tag class
in my booking / _form I have the following input fields : (startdate and endate) <div> <label for="startdate">Booking Start Date</label><br /> <%= text_field_tag(''startdate'', @startdate, {:class => @startdateclass, :readonly => "readonly", :maxlength => "25"} ) %> <%= observe_field("startdate",
2006 Jan 07
1
How to DRY with Fixtures (helper or extend Time class, how)?
I have a test/fixtures/users.yml like so: apa: id: 1 username: apa [...] created_at: <%=Time.now.strftime("%Y-%m-%d %H:%M:%S")%> updated_at: <%=Time.now.strftime("%Y-%m-%d %H:%M:%S")%> I don''t like how I''m repeating myself with the strftime bit. Is there some shorter Time method to format time for a (MySQL) datetime field that
2006 Jul 12
5
Reverse sorting
I am getting strange results when I reverse sort a query. I am sorting by date, but it doesn''t seem to be related to dates (I have tried just integers). I also paginate the results. Items in the result set are sometimes duplicated and the not ordered at all. When I try a non-reverse sort I don''t see duplicates and the ordering is correct. Any ideas what is going on? Thanks
2007 Oct 06
4
spec''ing views, mock_model associations
I writing a spec that returns the count of how many players in a game: it "should how many players in a link to all players" do render :partial =>"games/game", :object => @game response.should have_tag(''a'',"(2) Players") end I''m not sure how to do the mock model, I think it would be done two ways but unsure of the syntax: 1: add
2005 Dec 15
6
Code from famous RoR video?
Does anyone know where I could get text file with the code from the famous video where they create a Weblog in 15 minutes -- The one that''s here: href="http://rubyonrails.com/screencasts? (I can''t just watch it here at work, and I''d like to avoid having to re-type everything in any case.) Thanks! -- Posted via http://www.ruby-forum.com/.
2006 Jan 19
3
template/variable confusion
Hi there, I''m having some trouble working out where/when I can define template variables. I have a standard.rhtml layout template which is used across the application as the main xhtml wrapper. Inside there is some code like this: <div id="<%= @layout_style %>"> <%= @content_for_layout %> </div> Now content_for_layout always works fine, but
2005 Dec 21
1
RE: Prototype: correct useage of onComplete withAjax.PeriodicalUpdater
>From a quick look at the source code, it looks like onComplete is only called when the whole thing is done - in the case of Updater, right after the update, in the case of PeriodicalUpdater, right after it has been stopped. It looks like you need to pass your callback method as an ''insertion'' method in the options. This takes two parameters, the first will probably be the
2005 Dec 21
1
RE: Prototype: correct useage of onCompletewithAjax.PeriodicalUpdater
The only call that PeriodicalUpdater will make periodically to you is the insertion call. I think of onComplete as being ''I''ve done everything I was going to do'', which for Updater is right after it''s done a single update, but for PeriodicalUpdater, it''s after it''s finished all of its updates, so you''ll only get it once for any call
2006 Apr 05
7
Archive monthly count for blog
I am creating a blog to learn ruby on rails. from the layout page i pass all the posts as a collection to _archive.rhtml <%= render :partial => "archive", :collection => @archive %> On _archive.rhtml i have access to the collection. I am then gone to render partial another page _archivecount.rhtml to display the number of posts for each month. Can anyone give a clue
2006 Feb 28
5
browser-crash with Ajax.Updater
Hi, on my page I start an ajax-request which returns rhtml-code (I use Rails) looping over some objects. When I place the following code within the loop my browser (FF) crashs: <script> var set_std_objekt = function (id) { new Ajax.Updater(''divname'', ''/dosomestuff'', { asynchronous:true, evalScripts:true }) } </script> <a
2009 Sep 30
8
Cycle/Partials issue
First off, I''m fairly new to ruby on rails so this may appear simple but I''m just learning the ropes :) So I have a simple blog app where a post has many comments. The ''show'' view for posts renders a partial for each comment the post has. The css class of the containing div element is cycled using cycle(). The partial code is, <% div_for(comment, :class
2006 Apr 20
7
checking date
Radrails created a field for date <%= product.date_available.strftime("%y-%m-%d") %> What does this mean? Should the definition be date or datetime? I tried both and no results Jim -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060420/ed0cbb14/attachment.html
2006 Apr 11
5
RJS adds comment but doesn''t update form
Hi, When a user adds a comment i want to add the comment to the end of the comments list using ajax so there is no full page refresh. The code i have below adds the comment to the database but doesn''t update the comments div with the new comment. Can anyone help? This is my first use of rjs templates and i have read http://www.codyfauser.com/articles/2005/11/20/rails-rjs-templates
2006 Apr 10
10
Prototype Ajax - How to pass my own params to onComplete ?
Sorry if this has been covered before, i can''t imagine it hasn''t, but i''ve been unable to find any information on it. Can i pass my own parameters to the onComplete function specified by Ajax.Request ? My basic setup is i have an html element triggering an event (the ajax update). I have additional information encoded into the element about how it should handle
2006 Jan 20
47
SQL Server datetime error
i have a problem with the datetime format of rails. i am unable to save a dataset to the db. here''s the error message -- the original error message was in german, so i translated it -- i get: DBI::DatabaseError: Execute OLE error code:80040E07 in Microsoft OLE DB Provider for SQL Server Couldn''t convert a char-Datatype to datetime HRESULT error code:0x80020009