similar to: Layout for a module

Displaying 20 results from an estimated 60000 matches similar to: "Layout for a module"

2005 Dec 16
3
sharing layout code among different controllers
I want to have one layout for my whole application. The app has multiple controllers. Is it true that layouts are associated w/ one controller? thanks, etienne -- Posted via http://www.ruby-forum.com/.
2005 Nov 17
8
Components and layouts
Is there anyway for a component to use the layouts availble to rest of the app, but still use the templates under its own directory? Setting the layout with a "layouts/admin" say, just produces "can not find admin.rhtml...". Is there anyway around this? If not I guess I could just put the views under app/views, but really wanted to keep things seperate. Thanks! -Nick
2005 Dec 28
3
[Templates] [Noob] templates across controllers?
Fine Rails Hackers: I am trying to decide how to approach a templating concern. I would like to define a standard template for all of my pages (including a basic header, styles, footer) across my five base controllers: desktop, events, financials, and records, account. Is there a top level place to declare a template across the entire application regardless of the controller? I understand how
2005 Jan 28
16
primary_key_prefix_type, support for non-integer primary keys
Hello! I''m just starting out with Rails--and Ruby itself for that matter--and have a couple of questions regarding primary_key_prefix_type and non-integer primary keys. I see in the ActiveRecord documentation [1] that by default the primary key of a table "foo" is expected to be "id", though primary_key_prefix_type this can be changed to :table_name or
2005 Mar 08
3
Making a module method available in view
I have a Rails application called RailsApp. In my RailsApp/lib directory, I have a file called localization.rb that defines a module called RailsApp with a Localization class that implements a method l. (RForum devs and fans will recognize this as the YAML-based localization feature in that package.) I want to be able to call this method from my controllers and views. I have added a
2005 Mar 10
11
Default Values
Where in the application would you suggest I set default values that are read for every action and in some cases changed and somecases not. Basically on some pages I am getting the <title> from the DB and if not I want to put a default one up. Any suggestions?
2007 May 09
5
layouts + routes = confused
I''m new to RoR and the tutorials I''ve found on the web, while helpful, aren''t as "complete" as I''d like them. I understand the basics when it comes to layouts and routes, but I''m trying to get them to work together. MY first task was to implement a user authentication system (registration/login/logout/change_password). This works fine with
2005 Jan 25
29
Write-up on RoR + XUL Sample
Hi Folks, Just a quick message saying that, after much demand, I wrote a quick write-up for the RoR + XUL thing I did yesterday: http://www.zedshaw.com/blog/programming/ruby_xul.html It lays out the few simple things I did, has a bit of rant on an unrelated topic, and other stuff but it''s short still. On a related note, I''d like to thank "xal" on IRC for reminding
2005 Dec 27
7
help remove duplication in my app
I''m porting an old site of mine into Rails and I''m running into some duplication that could / needs to be weeded out. For each of my actions, I have to wrap the view content in the following HTML: <div class="box"> <img src="/images/content-top2.png" class="border" /> <div class="visible"> # content
2005 Oct 24
3
Custom View Location
Hi, I would like to have the ability for my application''s .rhtml files to be customized after I give my app to a client. However I don''t want them to mess with the existing templates. Basically I would like to look in a directory lets say "customize" which would be off the RAILS_ROOT directory. If a .rhtml is in the "customize" there use that one, if not
2005 Feb 16
4
Beginners Question
I''m just picking up rails...I''ve got a few questions. First, I''d like to get some input and parrot it back. I''m trying the following in my .rhtml file but it isn''t working. What am I missing here? <html> <head> <title>Search</title> </head> <body> <h1>Search for Filings</h1> <p> Use this page to
2005 Oct 25
2
generate scaffold ignores controller parameter
Since I upgraded from Rails 0.13.1 to 0.14.1 "generate scaffold <Model> <Controller>" doesn''t take any notice of the controller parameter. Anyone else suffering from this? E.g.: C:\Ruby\work\test>ruby script\generate scaffold User Admin exists app/controllers/ exists app/helpers/ create app/views/users exists test/functional/
2005 Dec 30
11
Losing my mind with Ajax link_to_remote
I''m playing around with Rails, and I can''t get this to work. I just can''t seem to wrap my brain around it. I''m having some trouble doing an Ajax navigation column. Here''s what I have: view layout: <div id="navigation"> <%= render(:partial => "navigation", :collection => @categories) %> </div> My
2005 Jun 08
7
Rails/lighttpd: Changes to controller not being seen?
This is a weird one: My app works fine on our local box with webrick. After uploading to TxD server, the app starts behaving weirdly. I make some edits to one of the controllers and my changes don''t seem to be going through. So I go ahead and change the name of the controller file. The page loads without error. I figure maybe I''m in the wrong directory, so I change the
2006 Feb 05
4
Another layout question - Layouts on a per method basis - Layouts with AJAX
I feel I am very close to understanding how layouts are used in Rails: Q1. I know one can specify a "default" layout for all methods in a controller by specifying layout ''my-default-layout'' How can this be overridden for individual methods so when those methods are called/executed, the overridden layout will be used. Is this possible? Q2. With no
2005 Apr 06
6
Mimic something like layout on a smaller scale?
I need to add various header and footer dressings around groups of form fields for GUI goodness, and am wondering if there''s already something out there that will suit my needs. These headers/footers have special properties for display(title, help links, etc...). I want to be able to easily take advantage of the existing HTML helper methods provided for controllers, in a mini-layout type
2005 May 18
10
Salted Login Generator issues
Hello all, I''ve just installed and begun to integrate the salted login generator. So far I''m very impressed, though I''ve hit a few snags along the way. Unfortunately, I''ve met the first one that I haven''t been able to resolve on my own. When I hit the login action, I get errors in my log files. The specific error with trace is included below.
2006 Jul 22
3
How to use variables in your layout views?
Let''s say I wanted to find 3 products from my database and put them in the layouts/application.rhtml view. Where do I find these 3 products? Do I just do it in application.rhtml? <% for product in Product.find(:all, :limit => 3) %> Because I was under the impression that you really don''t want to do this in your views. You should do this in your controllers and
2005 Dec 24
2
Common menu
Hi, I''m releasing my first rails application and I''d like to have a common menu in all my templates. Do I have to include an rhtml from .rb or other rhtml ? Some sample code pls ? Regards, Fabian
2005 Mar 05
3
login generator problem
I am trying to use the login generator, but I keep getting the following error when I run "generate login Account": /usr/lib/ruby/gems/1.8/gems/rails-0.10.0/lib/rails_generator/base.rb:84:in `manifest'': No manifest for ''login'' generator. (NotImplementedError) from (eval):3:in `__send__'' from (eval):3:in `manifest'' from