similar to: Navigation Helper

Displaying 20 results from an estimated 400 matches similar to: "Navigation Helper"

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
2007 Dec 23
1
Rails: possible routing discrepancy
Hey all, I''m seeing a strange behavior in my spec that I can''t account for. I''ve got a route that looks like this: map.writing \ ''/writing'', :controller => ''abstracts'', :action => ''index'', :index => { :select => ''all'' } and I have template code that looks like this: <br
2009 May 27
1
[PATCH server] UI tweaks for cloud
Initial styling for the cloud, added a few images Signed-off-by: Jeremy Perry <jeremy.perry at redhat.com> --- src/app/views/cloud/instance/index.rhtml | 2 +- src/app/views/layouts/cloud/cloud.rhtml | 9 +- src/public/images/mystery_cloud2.png | Bin 0 -> 1984 bytes src/public/images/tab_bg.png | Bin 0 -> 174 bytes src/public/stylesheets/cloud/layout.css |
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
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 =>
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
2007 Aug 27
2
issue with edge rails and urls
I just switched our project over to Edge Rails, and I''m running into this problem with all of my helper methods that call _url methods: NoMethodError in ''ApplicationHelper home_link should generate a valid home link when User.current and Profile.current is not set'' You have a nil object when you didn''t expect it! You might have expected an instance of
2009 Dec 23
3
Help with Navigation
I''m currently using CSS to style my navigational menu. I also have jquery at my disposal. The basic structure is like this: <div id="nav"> <div class="inner-container"> <div id="wrap"> <div class="inner"> <h2> <span class="h-ico
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
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
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
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;
2010 Oct 09
1
Loss of precision in read.csv.
Given a csv file from this location Airports<-"http://www.ourairports.com/data/airports.csv" download.file(Airports,basename(Airports)) airports <-read.csv("airports.csv",encoding="UTF-8") > airports[1,] id ident type name latitude_deg longitude_deg elevation_ft continent iso_country iso_region municipality scheduled_service 1 6523
2006 Feb 15
3
Applying list-item format depending on action
What would be the best way to do this? I have a list and I want one item to be underlined (depending on the action that I am on). Do I?: Have a bunch of if statements: if :controller => ''admin'', :action => ''list'' <li id="current">Pages</li> else <li>Pages</li> end What do you think? Is there a
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)
2005 Nov 08
1
Event.observers - I''m totally list - please help
Hello, I need some help on how to use the Event.observers - thank you in advance for your input. <div class="navcontainer"> <ul id="nav"> <li class="button"> <img src="images/spacer.gif" width="20" height="20"> </li> <li class="button"> <img
2006 Apr 03
5
Event.observe on IE
I''m working again on unloading events before making my ajax call. This code works on Firefox/Opera, but IE doesn''t seem to get the onclick events registered. Could someone with IE take a look? http://hank.org/demos/ajax3.html The js is included in that file. There''s alerts() to show when the events are registered. The idea of the code is to look for any
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
2006 May 23
3
image_tag problem
Hiall, I want to make an image_tag from within a controller in order to be able to present a link (with a status image) in a view. Here is my controller method (in file webca_controller.rb, hence WebcaController) def untouched_status_image_tag image_tag("open", { :alt => "Offen", :title => "Offen", :size => "12x12", :class =>
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