search for: ingoweiss

Displaying 20 results from an estimated 24 matches for "ingoweiss".

2006 Apr 17
7
Serve static XML files how?
Hi, a Javascript in one of my Rails templates needs to load a static XML file. I tried several places to put the actual XML file, and I also tried to make the file a rails template (tried both .rhtml and .rxml) and access it via a controller action. None of these ways worked. Does the lighttpd server know how to serve XML files, or do I need to configure it first? Or, is there a good workaround?
2006 Jun 16
1
diff (to html) for Rails?
Hi, I am looking for a way to compare to pieces of text, and mark up the differences with html. Basically the way Basecamp Writeboards do it. I was wondering whether this is available as a plugin (my initial search didn''t turn up anything). Ingo Weiss -- Posted via http://www.ruby-forum.com/.
2007 Nov 15
1
''lazy'' url generation in view specs
Hi, I would like to use the ''lazy'' style of url generation in my views, omitting parameters from my calls to url_for (and named route methods) that are then filled in from the current request parameters. Example: url_for(:action => ''index'') will fill in (:controller => ''posts'') if params[:controller] is ''posts''
2006 Apr 07
3
How to consume XMLRPC/SOAP web services in Rails?
Hi, does anybody know of any good HowTo for consuming XML-RPC and/or SOAP web services in Rails? I found some for Ruby (via soap4r/xmlrpc4r), but I was wondering whether there is something built into Rails already. So far it looks like there are methods to create web services, but not to consume them. Ingo Weiss
2006 Apr 04
6
Console for Testing Routes?
Hi, when the "Agile Web Development" book talks about routes, there are what looks like console transcripts like the following: URL> store @params = {:controller => ''store'', :action = ''index''} Is there something like a console for testing routes (where you could put in a url and see how rails would route it)?? Ingo -- Posted via
2006 Apr 04
4
Find records based on associated table''s colums
Hello, Let''s say I have a model for a "house". Each house has_a "city", which in turn has_a "state" which in turn has_a "country". The objective is to retrieve all houses in a given state, say "Massachusetts". Being new to Ruby on Rails what I like is that things that should be simple usually are simple, and since we have easy access to
2007 Jul 27
5
File.stub!
Hi, I''m trying to stub File.open and whenever I do, rspec blows up with the following error message (undefined method `add'' for nil:NilClass), which seems to happen because method __add in class Proxy is calling #add on global $rspec_mocks, which in turn is nil. Can someone explain what I''m doing wrong, as I can''t seem to stub anything out! Here''s
2007 Aug 31
48
Deprecating the mocking framework?
I saw in one of Dave C.''s comments to a ticket that "our current plan is to deprecate the mocking framework." I hadn''t heard anything about that, but then again I haven''t paid super close attention to the list. Are we planning on dumping the mock framework in favor of using Mocha (or any other framework one might want to plug in?). Pat
2008 Dec 16
20
step definitons to check login
I am working with the authlogic gem and trying to create a simple login test from cucumber features. The feature statement is: Given the user is not logged in The step definition for this is confounding me. In the application_controller the authlogic tutorial recommends the following: private def require_user unless current_user store_location flash[:notice] =
2006 Jul 10
0
tzinfo time zones and us states
Hi, I am just starting to work with tzinfo, and I need to figure out how US states map to tzinfo time zones, or in other words what time zone(s) each US state is in. If anybody has already collected this data and would be willing to share it (and thus save me a couple of hours of work) that would be highly appreciated! Thanks! Ingo -- Posted via http://www.ruby-forum.com/.
2006 Jul 11
2
Trademark registration
Hi, sorry if this is considered off-topic, however I suspect that this list is full of people developing their own web apps who would appreciate this kind of information, so: I was wondering whether anybody would be willing to share his/her experience with trademarking a web app''s name(/logo) in the US. What are the alternatives, and what is the best/most affordable way to do it?
2006 Jun 03
1
First time plugin user: Problem with "acts_as_versioned"
Hi, I am having trouble with using the acts_as_versioned plugin. I installed the plugin, and ran the migration. acts_as_versioned created the versioned table OK, but when I try to use it I get an error. Here is some console output: >> m = Mymodel.find(:first) NameError: undefined local variable or method `acts_as_versioned'' for Mymodel:Class Did I miss a step? Ingo --
2006 May 01
2
Error when creating table "left" in migration
Hi, I am getting an error when running a migration that is supposed to create tables called "bottom", "top", "left" and "right". Since "bottom" and "top" work just fine, my hunch is that in the SQL the "left" is mistaken for some join statement like "LEFT INNER JOIN". Couln''t one consider that a Rails
2006 May 04
1
Problem caching XML files
Hi, When I turn on action cashing for actions that render as XML using builder templates, the files are cashed with an .html extension, and subsequently served as html which breaks things. Is there a way to cache files with an .xml extension? Ingo Weiss -- Posted via http://www.ruby-forum.com/.
2006 May 10
2
Redirect whole page from AJAX action that updates a div
Hi, I am calling an action via AJAX to update a div. The action needs to redirect the page in under certain circumstances. However, if I just use "redirect_to" in the action then of course what happens is that the page I want to redirect to replaces only the div, not the entire page, and I get messy nested layouts. Is there a way around this? Can I redirect the entire document from
2006 May 23
0
html "class" attribute for "link_to_remote"
Hi, now this should be easy, but for some reason I was not able to generate a link with a "class" attribute using "link_to_remote". I tried several different ways, including the one that worked for "link_to", but so far no luck. I have to admit that I am not 100% sure how to read the rDoc documentation. If it says: link_to_remote(name, options = {},
2006 Apr 20
0
Migrations that don''t affect schema_info.version?
Hi, I am wondering whether it is possible to write and use migrations that do not change the schema_info.version. I would like to use the migration syntax to do certain tasks that don''t affect the schema like populating tables with sample data during development. Ingo -- Posted via http://www.ruby-forum.com/.
2006 Apr 20
2
previous|next navigation question
When creating "< previous|next >"-type navigation to browse through records from a list of search results, what is the most efficient (best practices-) way to determine what the previous and next records are for a given record? Should I store the search results array and the position (index) of the current record in the session? Or restore the results array each time (running
2006 Apr 24
2
Console and changes to models
Hi, I am using the console a lot to test certain things. However, when I make changes to a model, the only way I found to update the console environment to reflect the changes is to shut it down and open a new console session, which can get quite annoying. Is there a better way? Thanks! Ingo Weiss -- Posted via http://www.ruby-forum.com/.
2006 Apr 26
2
Problem with auto-submitting AJAX form
Hello, I have a form generated with form_remote_tag that contains a selection list. I would like to auto-submit the form when the user makes a choice in the selection list, so I added an option :onchange => ''this.form.submit()'' to select_tag Now what happens is that when I make a choice, the partial template get''s rendered as expected, but not replacing the