similar to: Navigation menu

Displaying 20 results from an estimated 4000 matches similar to: "Navigation menu"

2006 Jan 04
5
help with link_to_if, I can''t make it work...
For the life of me I can''t get it to work. Here is an example of my syntax. I''m trying to make comment.name a link to comment.web_site only if there is a comment.web_site. Can someone please help? <%= link_to_if(comment.web_site.length > 0, comment.name, comment.web_site {"class" => "comment_by"}) %> -- Posted via
2006 Jan 21
9
Where to put method
I''ve got following code in GenresHelper.rb def album_list(genre) albums = genre.albums.sort list = albums.collect { |album| link = link_to album.title, :controller => ''albums'', :action => ''show'',
2006 Jan 22
2
Rails and Apache: Error
I''ve done my development using WEBrick, and now I want to put my application on a server that uses Apache. (not with fcgi) I think I''ve done everything like I''m supposed to, but when surfing to my site I get: Application error Rails application failed to start properly" In /var/log/apache/error_log, I get this error:
2006 Jan 03
1
Passing parameters with link_to
I have following code in my controller: class AlbumsController < ApplicationController def list_by_year(year) @album_pages @albums = paginate :albums, { :per_page => 10, :conditions => ["year = ?", year] } render :action => ''list'' end end Now I want to make a link to the list_by_year action in
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
2005 Dec 22
2
ACL Navigation Links
I''m currently using the ACL (Access Control Lists) system in my app. The access control is working great, but I''d like to use the permissions/roles setup in the database to hide links to areas a user may not have access for automatically. I''m guessing that you could setup a helper function to use instead of link_to and have it check the permissions, but
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 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 =>
2006 Jan 04
7
wrong number of arguments error
I keep getting this error every time I try to pass a value to a method. Here is a sample nonworking method. I''ve been pulling my hair out over this all night! Why won''t it work!? My url path is :3000/store/browse/shoes and I''m getting this in the log Parameters: {"action"=>"browse", "id"=>"shoes",
2008 Apr 01
1
Navigation Problems
Hi, I am having problems with my page. I have a banner and navigation bar in controller_name.rhtml in app/views/layout. Can someone please help? Thanks In the navigation bar, I have the following links: Category1 Sub-Category1 Sub-Category2 Sub-Category3 Sub-Category4 Sub-Category5 Sub-Category6 In the main content, I have the following links: Sub-Category1 edit delete
2008 Mar 24
8
Proper idom for link_to_if
What I wish to do is to have a construct like this in a view: <%= link_to_if <some test>, "New Model View", new_model_path -%> <some test> has to return true if new_model_path is defined and false otherwise. What is the proper idiom to do this in rails 2? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received
2006 Jan 09
3
Scaffolding - disabling Create, Edit, Destroy for some user logins?
People, I am using: before_filter :login_required in my Controllers and this works fine. For some tables I am happy to use the output of eg: ruby script/generate scaffold Author but is there some way that I can disable Create, Edit, Destroy for some user logins in the corresponding view? Thanks, Phil. -- Philip Rhoades Pricom Pty Limited (ACN 003 252 275 ABN 91 003 252 275) GPO Box
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 Jan 04
7
variables in layouts
I have a layout that provides the basic outline of each page in my app. It has a title, footer and a navigation bar. In the title I want to put the name of the current user that is logged in. I could do something like @session[:username] but I would rather encapsulate that into a single variable so that I can change the key in the session map if I want without having to goto each page that
2006 Feb 05
6
render partial -- show certain content only if...
i''m working on a _post.rhtml partial, and it displays one blog post. i''m accessing this partial on the list.rhtml and the show.rhtml what i''d like is to only show the "link" link on the list.rhtml and not on the show page. <%= post.title%> <br /> <%= post.body%> <%= link_to
2006 Jan 11
5
stack level too deep problem
Hi all, I''m trying to overload the link_to function, (to disable link_to if the user has no access right) this is my code, it work the first time I run the application, the second time I refresh the page I always get "stack level too deep error" module UsersHelper include ActionView::Helpers::UrlHelper alias_method :link_to_original, :link_to def permission? true
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 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
2006 Feb 04
2
rendering subtemplates
hi, i''ve got main site navigation in the application.rhtml file. the links in this template correspond to the ''index'' page of various controllers. The controllers themselves each have navigation of their own, which i would like to appear in every view for a particular controller in *addition* to the main site navigation. The problem I am encountering is that
2005 Dec 15
6
Dynamic Text Replacement
I noticed there are a lot of PHP based dynamic text replacement examples out there such as: http://artypapers.com/csshelppile/pcdtr/ Is there anything like this for Ruby / Rails? I know there''s always SiFR but that method is often frustrating because I''ve noticed significant slow down in page load time even on pages that use it sparingly.