Displaying 15 results from an estimated 15 matches for "menu_item".
Did you mean:
menu_items
2006 Apr 18
4
update_page yields escaped code in callback
Hi All,
The subject pretty well describes what I am experiencing. This line in
an .rhtml template:
<%= link_to_remote menu_item.humanize,
{:update => ''section'',
:url =>{:controller => menu_item},
:complete => update_page do |page|
page.activate_tab("#{menu_item}_tab", ''menu_'')
page[''section''].hide
page[''section'...
2006 Jul 07
9
Search on data accross many tables, linked by belongs_to
I am using Ferret and acts_as_ferret, as my search back-end for my Rails
project. I have a question about using acts_as_ferret on a main table
that is linked to other tables by foreign keys. Is there a way to
include the information linked by the belongs_to keyword in the search
results ?
As an example, let''s say I have a main table ''posts'':
2009 Sep 10
1
undefined method `protect_against_forgery?'
When I use plugin ''railstree'' (http://www.hashcode.eti.br/?p=91) as
following code:
node = Node.new :label => menu_item.name,
:link_to_remote => {
:base => self,
:update =>
"container",
:url => {...
2006 Jan 07
3
user engine question
...;},
{:menu => ''logout'', :controller => ''/user'', :action => ''logout''}
]
These are cobbled together in my application_helper.rb as:
def construct_horizontal_menu(menu_array)
menu_strings = []
menu_array.each do |menu_item|
menu_text, throw_away = menu_item.delete(:menu)
menu_strings << link_if_authorized(menu_text, menu_item)
end
menu_strings.delete_if{|x| x.strip == ''''}
menu_strings.delete_if {|item| item =~ (user? ? /login/ :
/logout/)}
menu_strings....
2006 Jun 22
0
sortable list doesn''t work on production server
...tions"}
I''m using ruby 1.8.4 with rails 1.1.2 on both machines. The only
difference is from mac to RHEL4
Can anyone give me an idea of what could be the problem?
In case you need it, this is the action:
def sort
@navigation = Navigation.find(:all)
@navigation.each do |menu_item|
menu_item.display_order =
params[''menu-list''].index(menu_item.id.to_s) + 1
menu_item.save
end
render :nothing => true
end
This my view:
<ul id="menu-list">
<% @navigation.each do |menu| %>
<li id="item_<%= menu.id %>...
2010 May 25
2
Site Navigation With Polymorphic Has Many Through
...ically update.
So I thought about it for a while, and decided on a MenuItems class, which
contained the position of the child in relation to it''s siblings, where the
parent and the child were polymorphic. Then a given childable object can
find it''s parentable by going through the menu_items table.
I want my nav to be able to do things like this:
--Category1
----SubCategory1
------Product1
------Product2
----Product3
--Category2
----Product4
--Page1
--Page2
--Page3
This is the current setup:
MODELS
class MenuItem < ActiveRecord::Base
belongs_to :childable , :polymorphic =&g...
2010 Apr 21
4
Accessing the router from a helper
I find manually accessing the router to be quite ugly below. Is there
a more direct way to access it?
module ApplicationHelper
def menu_item text, url = nil
routes = ActionController::Routing::Routes
url = if url
if url.is_a? String
url
else
routes.generate url
end
else
routes.generate :controller => text
end
unless text.is_a...
2010 Sep 18
1
some question
I am making a program and get some trouble here
1. how do I close all opened child window in mdi form?
2. I cannot disable menu_item, perhaps I use .enable false the wrong way?
--
Suka linux?
Kunjungi blog saya http://penguinroad.blogspot.com
_______________________________________________
wxruby-users mailing list
wxruby-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/wxruby-users
2008 Oct 07
0
associations not saved in migration
...used save! in the hopes that an exception gets raised but no luck. the
migrations run without errors but the data isn''t in the db. can anyone
point out what i might be doing wrong? thanks! code below.
class AddDeliIdToMenuItem < ActiveRecord::Migration
def self.up
add_column :menu_items, :deli_id, :integer
# todo - the code below doesn''t work, wtf?
deli = Deli.find(:first)
items = MenuItem.find(:all)
for item in items do
item.deli = deli
item.save!
end
end
def self.down
remove_column :menu_items, :deli_id
end
end
class CreateT...
2020 Jul 28
2
Phabricator down for maintenance tonight
...9;)
> + ->setIcon('fa-times')
> + ->setTooltip(pht('Collapse'))
> + ->addSigil('differential-inline-collapse')
> + ->setMustCapture(true)
> + ->setAuralLabel(pht('Collapse'));
> +
> +
> $menu_items[] = array(
> 'label' => pht('Reply to Comment'),
> 'icon' => 'fa-reply',
> diff --git a/webroot/rsrc/js/application/diff/DiffChangesetList.js
> b/webroot/rsrc/js/application/diff/DiffChangesetList.js
> index 7293f89..bb84997 10...
2006 Jul 23
6
how do you give focus to a form field?
When you put up a page with a form on it and the top item is a text
field it would be nice to have that field already focused instead of
forcing the user to click in it before they start typing. Is there a
rails (i.e. probably Prototype) way of giving focus to a field? I did
some searching and found nothing.
thanks,
jp
P.S. I''m on a Mac. Perhaps a winoze and/or unix automatically
2005 Aug 25
1
newbie questions about hosting address
...w.
For example menu items order.
----------- YAML -------------
# define the order of items in the menu
menu-items:
- it: homepage
- it: services
- it: news
menu-item:
{ it }
menu:
{ menu-items }
body:
{ menu }
----------- RUBY -------------
items = get( ''menu-items'' )
menu_items = get_each( ''menu-item'', items )
render( ''body'', { ''menu'' => get( ''menu'', menu_items ) } )
------------------------------
Message: 9
Date: Thu, 25 Aug 2005 17:09:06 +0200
From: G?bor SEBESTY?N
Su...
2006 Mar 07
3
Can variables in the template be used in the layout?
This may be a silly question, but I''m wanting to develop a query to pull
''related articles'' based on tags.
When a user clicks on an article to read, on that layout, I want a side
menu to have the related entries. If I develop the query to do this,
can I access the current tags for the entry in the layout?
I guess I''m asking, does <% content_for_layout
2020 Jul 28
2
Phabricator down for maintenance tonight
On Tue, Jul 28, 2020 at 11:04 AM MyDeveloper Day <mydeveloperday at gmail.com>
wrote:
> Out of interest are you keeping the local modifications in a fork of the
> Phabricator source (llvm-phabricator)? Firstly we should be keeping any
> changes we make in source control but also it's good to review those
> changes.
>
I didn't innovate, Manuel set it up originally and
2009 Sep 23
2
[PATCH node] Introduces the virtual network administration functions.
..."An Exception Has Occurred",
- str(error) + "\n" + traceback.format_exc(),
- buttons = ["OK"])
- screen.popWindow()
- screen.finish()
- finished = True
+ def get_menu_items(self):
+ return (("Node Administration", NODE_MENU),
+ ("Network Administration", NETWORK_MENU))
+
+ def handle_selection(self, page):
+ if page is NODE_MENU: NodeMenu()
+ elif page is NETWORK_MENU: NetworkMenu()
+
+def MainMenu():
+...