similar to: Rails: possible routing discrepancy

Displaying 20 results from an estimated 800 matches similar to: "Rails: possible routing discrepancy"

2008 Jun 15
11
[PATCH] helper to create fb css stylized table
I attached a rails helper implementation of the fb_table described here: http://wiki.developers.facebook.com/index.php/Facebook_Styles I included testing and comments. I hope you find it useful. Curiously, it''s really a small extension of FBML. Richard -------------- next part -------------- Index: test/rails_integration_test.rb
2006 Sep 05
1
Named routes and current_page? incompatibility
Hi, I have some named routes defined e.g. map.public and wish to use link_to_unless_current() to disable link. However, as I''ve seen from forum discussions and the API doc, the issue lies with the fact that the named_route_url() method generated by a named route does not default to only_path = true like url_for. Therefore, the current_page? within link_to_unless_current() will not
2006 Jan 02
3
best to integrate dynamic navbar into layout
I''ve been trying to come up with a good way to integrate a dynamic navbar into my layout. By dynamic, I meas that each link has 3 images. Normal, rollover, and dark for the current page. I have it working but it seems like there should be a better way. Here is how I did it, please let me know if there is a better way. Rails makes so many things simple, that this seems very
2006 Jan 04
2
Navigation Helper
I am attempting to integrate a main navigation section into my web application. Naturally the easiest and DRY way to do this would be to either include it in a layout, or as a partial. The only problem is that I want the link for the current page to have its own css id ("current"). The only way I can think to accomplish this is to just include the navigation in every page, but this is
2007 Dec 16
3
how do I spec my Rails routes?
Once again, here''s something I haven''t figured out. Apologies if this is too newb-ish, but, how do I spec my routes using RSpec-Rails? In particular, I''ve got a catch-all route that needs to catch a wide variety of URLs: map.document ''*url'', :controller => ''documents'', :action => ''show'' Is there a way to
2006 Jan 29
4
current_page?()
Can someone give me a working example of current_page?(), because I''ve been trying to get this to work for a while now. I''ve been trying this: if current_page?(".*") @test = "asd" end but get a "undefined method `current_page?''" when I put it in my controller or application.rb. If I put it in my application_helper.rb, the page renders
2006 Sep 21
4
strange matching: maybe a multilanguage collation problem?
Hi, We''re using Ferret in a slightly unorthodox way: We''re indexing a large (>100,000) list of names of places all around the world. Mostly we''re quite happy with it, and have been able to graft on our own particular required functionality with just a little tweaking. There''s one strange problem, though: We''ve got a place in Cyprus called
2007 Jul 30
2
build a menu (li.selected)
Hello, when I try to create a menu I found the following limitation: the event li.selected does not work and, I am not being able to show an image when the menu option is selected in my CSS exists the following code: .menu li.selected { ... background: transparent url(/images/menu_selected.gif) 100% 1px no-repeat; ... } in file: ...\layouts\application.rhtml exists the following code: <div
2007 Dec 01
5
specifying an HTTP status code
Hi all, I''m just starting to work w/ RSpec, so I hope this question isn''t too obvious or missing the point somehow: Is there a way in RSpec to specify that a controller action should use a specific HTTP status code? Specifically I want to test for the usage of 301 as opposed to 302, for a permanent redirection. response.should be_redirect looks like it calls
2010 Sep 10
10
current_page? inside controller
Is there any easy way of using something like current_page? method from ActionView::Helpers::UrlHelper inside controller ? I have routing like: resources :addresses resources :mailing_addresses, :controller => ''addresses'' And I would like to do a check in my controller that would look like this: class AddressesController def index if current_page?(live_addresses_path)
2008 Dec 17
2
Help with link_to and its kin
Hi Everyone I am a new user of Ruby and Rails, and would like some help with the following problem. I have created a navbar with a styled unordered list and I would like to apply class="current" to the tab for the current page. Currently I am using a large, cumbersome and ugly if..then block, rendering the class="current" into the html and link_tos with current_page?. I am
2005 Jul 13
1
link_to_unless_current woes...
Hi ! I have the following in my navigation area: <%= link_to_unless_current image_tag(''events.gif'', :height => 34, :alt => ''Events''), :controller => ''events'' %> Works nice untill I am on the events page, in which case the generated code looks like: &lt;img alt=&quot;Programs&quot; height=&quot;34&quot;
2009 Mar 24
12
MonkeyPatching ActiveRecord::Base class
I am trying to monkey-patch the ActiveRecord::Base class to incorporate a generic search class method so that it can be used by all model classes which need this functionality. Since model classes directly inherit from ActiveRecord::Base and unlike controllers and helpers, do not have an ancestor class defined, I think I am forced to open the ActiveRecord::Base class and patch it? May be I am
2009 May 04
1
[PATCH] oggz: inefficient seeking
I have a 1.1G Ogg file with vorbis and theora. oggz_seek_units() takes 14 seconds to find a position in the file towards the end. Now, the function guess() in oggz_seek() guesses a position at about 1.5G and then slowly searches back until it finds the end of the file (continously seeking beyond the end of the file and then calling read which returns 0). Then it does a linear scan from the
2006 Mar 30
11
Illegal char \002? Need to restart Rails to see changes?
Hi all, I''m developing an app on a home Windows computer and using SVN/Capistrano to deploy to a Linux server. I''m encountering some bizarre behavior that I think has something to do with Linux and Windows text file types, but I''m not sure. What''s happening is that, whenever I edit my view files and reload the page in my local browser, I see errors saying
2008 Jul 09
2
setting request.raw_post with rspec-rails
... is there a way to do this? We have some REST-ish POSTs we''d like to spec out. In the controller this gets accessed with request.raw_post.to_s, is there a way to set this with rspec? Thanks as always, Francis
2005 May 21
0
How can I get a post-Routing translated url_for?
Is there a way to ask the Route system what controller and action mapping will be used, given a hash containing :controller and :action? I am trying to generalize the case where there is a button bar (e.g. tabbed pages) having one image shown if you are presently visiting that page, and another shown if you are not presently visiting that page (e.g. an "active" and an
2007 Aug 02
0
4 commits - libswfdec-gtk/swfdec_gtk_loader.c libswfdec/swfdec_file_loader.c libswfdec/swfdec_loader.c libswfdec/swfdec_loader.h player/swfdec_slow_loader.c
libswfdec-gtk/swfdec_gtk_loader.c | 12 +++++++----- libswfdec/swfdec_file_loader.c | 19 ++++++++++--------- libswfdec/swfdec_loader.c | 30 +++++++++++++++++++++++------- libswfdec/swfdec_loader.h | 3 ++- player/swfdec_slow_loader.c | 2 +- 5 files changed, 43 insertions(+), 23 deletions(-) New commits: diff-tree 013119a40898e8308caba54d3921d3c477f239c8
2005 Dec 15
6
Navigation menu
I have a navigation menu that contains a link per controller in my application. This menu is the same for all controllers, but I want this behaviour: <a>Users</a> <span>Statistics</span> and <span>Users</span> <a>Statistics</a> depending on the page you''re currently on. I''ve put a <render :partial =>
2007 Aug 22
1
Tabbed Navigation
Went back and forth a bit trying to find out the easiest way to do this. Found a plugin but it didn''t seem very stable/well written. This is what I have going right now: - if @content_for_recipe_editor_tabs = yield :recipe_editor_tabs - else = tabbed_navigator(RecipesController.send "edit_tabs") If any templates/sub-templates/partials used in this render have