similar to: How to let the layout be more OO?

Displaying 20 results from an estimated 100 matches similar to: "How to let the layout be more OO?"

2006 Mar 12
0
Unexpected attribute modification
Hi all, I''m trying to do multiple render_to_string() calls in a method call, and I''m getting attributes being modified in unexpected ways. @left_sidebar = render_to_string( :partial ..... ) puts @left_sidebar.id (-> 123456) @right_sidebar = render_to_string( :partial .....) puts @left_sidebar.id (-> 234567 WTF!?!?!) puts @right_sidebar.id (-> 345678)
2006 Sep 29
2
ApplicationHelper is not a parent of SomeHelper?
i have: # file application_helper.rb module ApplicationHelper def load_components @right_sidebar = ''some stuffs'' end end # file user_public/blog_helper.rb module UserPublic::BlogHelper def load_components ApplicationHelper.load_components @right_sidebar += ''{blog archive}'' end end the problem is, i want to load the
2006 May 25
0
Double Render Error...
I''ve been fighting with a Double Render Error. I have some sidebar partials that I render to strings in my application controller''s before_filter: @left_sidebar_for_layout = render_to_string(:partial => ''shared/left_sidebar'') Then in my application layout, I simply add them as a string, like I would @content_for_layout This normally works fine. However,
2006 Jun 09
8
Installation on OSX...
Hi, Just got my first Mac. I''m trying to install rails on it, using the instructions in the rails wiki: http://wiki.rubyonrails.com/rails/pages/HowtoInstallOnOSXTigerUsingDarwinPorts I go to install mysql, and the version of mysql supported by DarwinPorts appears to be 4.1.18. But all the sites appear to only have 4.1.19 or 4.1.20. So it looks like DarwinPorts is over a month out
2006 Apr 18
2
link_to_function onmousedown
Hi, Is there some way to produce an anchor that looks like the following using helpers, or should I just code it in the rhtml like this? <a href="#" onmousedown="javascript:foo(); return false"> Thanks, Brad -- Bradley Mazurek
2006 May 24
1
How to marshal Javascript data?
I''m trying to marshal some information I have in Javascript, and send it over an AJAX request to the server, specifically to be stored in a model on the server side. I have some Javascript routines I wrote that gather information about the user selection. I see that the link_to_remote has a :before option in which I can write Javascript to collect what I need, but right now I''m
2006 Apr 04
1
Manipulating has_many :through associations
Hi, I haven''t done any associations before, so please forgive my incorrect use of terminology... If I set up a has_many :through association, can I manipulate the associated instances directly (like an Array), or do I need to manipulate the join model? For example, suppose I have two classes and the associated join model: class foo has_many :foo_bars has_many :bars, :through
2004 Aug 16
2
randomize Dial() target
Hi, is it possible to randomize extension which would be choosed by Dial()? I would like to forward phone calls to one of sales rep in randomized way (not to harm anyone;) ). tia mazek -- http://www.marcinmazurek.com/ ::: nic-hdl: MM3380-RIPE GnuPG 6687 E661 98B0 AEE6 DA8B 7F48 AEE4 776F 5688 DC89
2004 Apr 18
4
Intel 536ep as a FXO?
Hi, I've seen some reports about ruuning Intel modem with 537 or MD3200 chipset running with Zaptel drivers as a FXO port. Did anybody managed to set up a PCI faxmodem based on Intel536ep chipset to work with * and Zaptel drivers? Modem seemd to work just fine with Linux, but the driver says no;) some more info: Linux 2.4.26 mazuchna:~# cat /proc/pci | grep 536 Communication
2006 Mar 08
1
Components calling components...
Hi, I''m relatively new to ruby and rails. I would like to have a sidebar component call one of several other constituent components. I''ve run into some problems, and so I''ve pruned things back to a relatively simple case. I have a sidebar component. Renders great. In it''s layout, I call render_component for another component I would like in the sidebar.
2007 Feb 17
2
HOW to enable traceroute with IPTABLES
Hi, I am setting up a firewall on CENTOS 4.4. I have done default block iptables -P INPUT DROP iptables -P FORWARD DROP iptables -P OUTPUT DROP I have enabled ICMP to www.google.com iptables -A OUTPUT -p icmp -d 64.233.189.104 -j ACCEPT iptables -A INPUT -p icmp -s 64.233.189.104 -j ACCEPT Ping works fine as below [root at firebox rc.d]# ping 64.233.189.104 PING 64.233.189.104 (
2007 Jan 30
2
Accessing an external USB disk
I was able to remove the NTFS partition and repartition the HD as a type Linux (83). Next I created the ext3 file system. If I reboot with the USB drive attached, the boot process hangs, however if I turn off the drive, boot and then turn it on, all is fine. # cat /etc/fstab shows the drive, but I am not sure how to use it for a backup nor do I know how to access it. Any help would be
2004 Aug 19
1
chan_phone - compilation problem
Hi, I have a latest asterisk cvs sources on my box, the rest of enviroment is: gcc version 3.3.3 20040412 (Red Hat Linux 3.3.3-7) linux 2.6.7 and after checkout I get: In file included from chan_phone.c:36: /usr/include/linux/ixjuser.h:353: error: syntax error before '*' token make[1]: *** [chan_phone.o] Error 1 make[1]: Leaving directory
2004 Nov 30
1
wanic 520 with asterisk card
Hi, has anyone been trying to use wanic520 card with asterisk? It's E1 card, but I can't find any info about asterisk and wanic cooperation. anyone? tia mazek -- http://www.marcinmazurek.com/ ::: nic-hdl: MM3380-RIPE GnuPG 6687 E661 98B0 AEE6 DA8B 7F48 AEE4 776F 5688 DC89
2004 Dec 19
1
TE110P - problem with zone from zaptel.conf
HI, basic question. I've got a TE110P card and I'm trying to set it up with ztcfg with polish zone. ioctl(ZT_LOADZONE) failed: Invalid argument Notice: Configuration file is /etc/zaptel.conf line 206: Unable to register tone zone 'pl' I've got loadzone and defaultzone set to pl, and there is a definition of that zone in zonedata.c but it doesn't work. Any hints? tia
2006 Mar 10
1
Problem rendering components
I have an AccountsController that inherits from ApplicationController. In ApplicationController I define a generic layout. In this layout I render @title that is actually assigned in the AccountsController but has a default value in ApplicationController. In the layout template, I also have the standard contents_for_layout and lastly, I have a render_component. The component called from the
2006 Apr 08
5
If-Else Conditionals in Views
I find myself doing the following quite a lot: <% if user %><%= user.name %><% else %>Anonymous<% end %> I know that if I dont care about an else I can just do: <%= user.name if user %> Is there any simpler way to handle the else? This is a simple example so it''s not really an issue.. but for more complicated tests this gets quite tedious. -- Posted
2007 Jan 25
10
Problems with building a complete kernel
I have a plain vanilla Centos source (not 100% sure where we got it from), but I can't seem to get a build that installs correctly. I tried the method described at http://wiki.centos.org/HowTos/Custom_Kernel, but rpm doesn't like the output file, and even if I install it with -F, nothing seems to happen - no new kernel, now initrd, nothing. When I tried following the directions in the
2006 Jun 22
18
Ruby on Rails Live CD
I''m pleased to announce the initial release of the new Ruby on Rails LiveCD Linux Distribution. http://www.railslivecd.org The RailsLiveCD offers most of what an average Rails developer needs right out of the box! That includes : Ruby 1.8.4 Rails 1.1.2 Capistrano 1.1.0 Mongrel 0.3.13 Rake 0.7.1 Subversion MySQL 4.1.12 MySQL Administrator RadRails KDevelop Kate and many many others!
2006 Mar 08
0
Can components call components?
Is a component supposed to be able to call another component (which presumably could call another component)? Brad -- Bradley Mazurek