similar to: link_to_unless_current woes...

Displaying 20 results from an estimated 800 matches similar to: "link_to_unless_current woes..."

2008 Sep 30
0
Tabbed Menus - link_to_unless_current
This is more difficult than I originally anticipated. Any help in figuring this out is most appreciated: This is a code snippet from my header.rhtml (or erb) file that draws tabbed menus: <ul> <% [["Home", "/home" ], ["Positions", "/company" ], ["Leads",
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
2008 Dec 25
0
link_to_unless_current & I18n.t
How can I use link_to_unless_current with I18n.t localization? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group,
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
2009 May 07
12
is there simpler way to export html within xml
Hi, we''re exporting a lot of html code within xml, our current method works but it''s very messy - far from perfect, is there a better way to do this. an example of our controller code is html = html + "&lt;img src=&quot;/icon/icon_email.gif&quot;
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 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 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
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 =>
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
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
2005 May 30
2
Testing action mailer in functional tests - missing section in the book
Hi ! I just need a pointer on how to do functional testing of ActionMailer. My unit test for the ActionMailer is working fine - now I simply need to assert that it''s being called in my Controller. The testing book ends quite abruptly at http://manuals.rubyonrails.com/read/chapter/64 I searched around on the web, but I didn''t find anything very conclusive. Thanks, François
2006 Jun 30
0
Accessing View methods from Model?
Hey. I have Menu model which recursively renders a menu. Now I want to use link_to and link_to_unless_current methods from View helpers inside my Model. Any ideas how I coulkd do that? -- Posted via http://www.ruby-forum.com/.
2010 Jan 05
0
Problem with associating comments with blog posts on same page
Hi, I will admit I am very new to ruby and I am trying to do something that is not in any tutorials I have found. If you see a more conventional way to do some of the things I am trying to do, please let me know. What I am trying to accomplish. People can edit the comments on the same page as the listing of posts. The problem is that when I go to create the comment, it is not getting associated
2006 Mar 09
1
disable link to current page
Hi, When writing a .rhtml file how can i detect which url is being rendered and disable the links? Even more, I may want to change some other css classes for other elements based on which url is the current one. Thanks, Peter
2006 Jun 07
6
Links on the left hand side - are components necessary?
Hello, Maybe this is super-trivial... I need to have a list of links on the left hand side of my application, for *every* single page. So, I''ve created a layout called "main" (main.rhtml) under view/layouts, and included >layout "main"< in pretty all of my controllers. main.rhtml has, amongst all the other HTML stuff: <%= render_component
2015 Apr 08
4
SIGTERM signal to qemu-kvm process
Hi I am using QEMU 0.12.1 as the hypervisor in my RHEL installation of 6.5. I wanted to know if there are any side-effects with respect to VM image corruption when i use SIGTERM signal to kill a qemu-kvm process which effectively stops my VM running on the host. Appreciate if you can provide me some valuable information in this regard. Thanks Jatin
2005 Sep 14
4
How to drag/drop visitable anchors ?
Hi ! I have the following: <li id="photo_<%= @photo.id %>" class="photo"> <%= link_to(image_tag(url_for_file_column(:photo, :picture)), {:action => ''photo'', :id => @photo}, {:title => @photo.description}) %> </li> <script type="text/javascript" language="JavaScript"><!--
2005 May 23
1
has_and_belongs_to_many dual insert error ?
Hi ! (See references at the end) I have a slight problem. Whenever I save one of my domain models, which contains an has_and_belongs_to_many relationship with another one, the relationships are doubled. My domain is a series of pictures, where each picture can be tagged with one or more words. So, a picture of my dog could be tagged "Jordy, Dog, Dog 2005", for example. In my
2007 Jan 25
4
How to change the menu depending on the controller/method?
Hello, I''m still dtarting with ruby on rails. And I''m trying to have a menu depending on the current controller/method. Here is what I was thinking of (please tell me if there''s a better way to do it): I have a database with menu_groups (corresponding to controllers) and menu_elements(corresponding to methods). Each menu_element belongs to one menu_group. I created a