Displaying 8 results from an estimated 8 matches for "_menu".
Did you mean:
menu
2005 Dec 15
6
Navigation menu
...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 => "_menu"> in the layout/application.rhtml
file that is used as layout for all views. And in every view map, I then
define a _menu.rhtml partial.
This is of course not flexible enough, since when I want to change some
name, I have to make changes in all these files.
What is a better way?
--
Pos...
2006 Feb 19
2
instance variables in components not read by component view?
...list of menus to display within my sidebar
component controller code and pass that list to the component display
view, like so:
# menu_controller.rb
class Sidebar::MenuController < ActionController::Base
uses_component_template_root
@menus = %w{admin user help}
def display
@display_menu = params[:menu]
render(:layout => false)
end
end
# menu/display.rhtml
<div class="menu">
<% @menus.each do |menu| %>
<%= link_to_remote "#{menu}",:url => { :controller => "sidebar/menu",
:action => ''toggle_menu'', :me...
2009 Feb 03
1
Passing args to generator
I have some default_options in generator and when I wish to change they
value with --option_name I get only logical true instead of string
...
default_options :option_name => "Some string"
...
def add_options!(opt)
opt.separator ''''
opt.separator ''Options:''
opt.on("--option_name","Some Text") { |v| options[:option_name] = v
2008 Jan 21
7
undefined method error
Hello everyone,
I am following the Practical Rails: Social Networking
sites book. In chapter 7 photo gallery I am getting a
NoMethodError in Pages#show
Showing layouts/_menu.rhtml where line #12 raised:
undefined method `new_entry_path'' for #<ActionView::Base:0x52fa56c>
Extracted source (around line #12):
9: <% if is_logged_in? %>
10: <li>Logged in as: <i><%= logged_in_user.username %></i></li>
11: <li&...
2010 Jul 06
4
Simple routing problem
I''ve got the following in config\routes.rb:
map.resources :users
In app\views\shared\_menu.erb, I''ve got:
Please sign in <%= link_to
"here", :controller=>"user", :action=>"sign_in" -%>
In app\controllers\users_controller.rb
def sign_in
end
When I run the application, I crash with:
Routing Error
No route matches "/user/sign_i...
2006 Aug 15
1
Local Variable Troubles
Hi all,
I currently have a partial named _menu, where I generate the menu for my
site. I pass locals to it with a render :partial. I have the partial check
for 2 items, display_title and klass. I only pass these to the partial if I
need to use them, otherwise no locals named display_title or klass are
present in the partial. I test to see i...
2011 Dec 02
0
Testing Views with Rails 3 and Rspec2 - Can't stub request.path_params[:controller]
...er"].should
eq("admin/stores")
render
rendered.should =~ /#tab-3/
end
end
The given error:
Failure/Error: render
ActionView::Template::Error:
can''t convert nil into String
# ./app/views/admin/settings/_menu.html.erb:5:in `+''
# ./app/views/admin/settings/_menu.html.erb:5:in
`_app_views_admin_settings__menu_html_erb__3443097722112408564_2172534220_4114188497869029268''
# ./app/views/admin/stores/index.html.erb:6:in `block in
_app_views_admin_stores_index_html_erb___284...
2011 Oct 07
0
puppet 2.7.5 and augeas break grub.conf on RHEL5
Hi,
I was running puppet (2.7.5) on a host which needed to have some
settings changed in it''s /boot/grub/menu.lst file. This file is
however a link to /boot/grub/grub.conf
When I used augeas in puppet like shown below
augeas { "${dom0::params::module_label}_menu.lst_memory": incl => ''/
boot/grub/menu.lst'', lens => ''Grub.lns'', changes => [ ''set title[1]/
kernel/dom0_mem 2G'', ''set title[last()]/kernel/dom0_mem 2G'', ], }
it updated the menu.lst, but menu.lst is now a file a...