similar to: Content_for_layout

Displaying 20 results from an estimated 2000 matches similar to: "Content_for_layout"

2006 Jan 25
14
Salted Hash Login Generator
Does this work with rails 1.0 ? I saw that people said it failed with rails 14.1, which practically identical. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060125/5da24694/attachment.html
2006 Jul 10
7
What is has_many :through really buying you over HABTM?
So having just learned how to do has_many :through as opposed to HABTM, and then, being concerned that I wouldn''t get it to work, I started thinking about these two approaches. It seems to me that the _only_ problem that the HM:T (has_many :through) approach solves that HABTM doesn''t is the issue of the potential collision of id columns between your join table and one of
2006 Jan 23
8
yield vs @content_for_layout, etc..
I am relatively new to RoR and Ruby for that matter. A few questions for the pros: Question 1: In the 5min ajax video the presenter uses <%= yield %> in his layout. In the agile book, @content_for_layout is used. Since, yield is an actual Ruby construct, is it more efficient and preferred? What is the difference? Question 2: Links are often of the form :action =>
2006 May 11
3
can''t call link_to from within a model class
can anyone tell me how to call link_to from within a model class? I''m trying to do something like the following: validates_uniqueness_of :email, :message => "address has already been taken. If you''ve forgotten your password, please click " + link_to(''here'', :action => ''forgot_password'', :controller =>
2006 Jul 11
18
Zip Code Ranges
Does anyone have any recommendations for working with zip code distance ranges? I need to calculate the distances between US zip codes. Thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060711/f133d7de/attachment-0001.html
2005 Oct 20
5
Unit Test Error: `load_specification': undefined method `parse' for Time:Class
All, I''ve come across a confusing problem when attempting to run unit tests for an application on OSX (works on Windows). I''m receiving the following error: `load_specification'': undefined method `parse'' for Time:Class (NoMethodError) This is also confusing because I can''t figure out how the error appeared. When I revert back to previous revisions,
2006 Apr 17
11
Would you switch jobs for the chance to use Textmate?
Lets say you had a pretty decent job, but your company mandated use of emacs. The poaching employer offers you a free copy of Textmate(tm). Would you jump ship solely in order to use Textmate at company B? Cheers, Dave -- Posted via http://www.ruby-forum.com/.
2006 Jun 06
9
How to protect images from public?
Hi, I''m trying to figure out the best way to protect images uploaded by users who may wish to keep them private. For example, if they are uploaded in the default file_column location (/public/blah/blah/1/) then someone can simply type the URL http://www.blah.com/blah/blah/1 and get the image. I can store the images in a non-public directory in the rails app (ie: /railsapp/images/X/)
2006 Feb 17
7
FCGI hanging w/ lighttpd and RoR 1.0 (need to kill -9)
Hi, everyone, I''m currently running a Rails 1.0 project using lighttpd-1.4.9 behind Apache 2 on RHEL 3. My fcgi process (I''m only using one right now) always hangs after some time, which is something I haven''t experienced before (e.g., I''ve run this same app. on a TextDrive account and it works fine there). So ... any ideas on what could be causing this?
2008 Mar 19
6
Back button behavior has changed again in Safari 3.1, after doing a dom update via ajax/RJS
GAH! Here is the firefox behavior, which is perfect: 1) View page 1 2) Update some text by using link_to_remote or remote_form_for, along with an RJS replace or replace_html 3) Navigate to page 2 4) Hit back 5) Page was cached with dom updates, note that the page is show in the same state as it was left Safari 3.0 behavior 1..4) repeat 5) Page reloads, ending up in the state where it was left
2006 Aug 09
3
[Markaby] yield instead of @content_for_layout?
We''re supposed to use yield instead of @content_for_layout, but I can''t get yield to work in a Markaby template: yield text yield Either one of these lines results in a ''no block given'' error (but ''text @content_for_layout'' works). Anybody know how to use yield instead? Thanks, Joe -- Posted via http://www.ruby-forum.com/.
2006 Feb 15
5
Formating @content_for_layout
Hi all, I sent a message earlier, so forgive me if you have already read this (I got some cryptic message in German about how my e-mail was not read?). Anyway, I was just wondering if there was any way to format the html that is output using <%= @content_for_layout %> I want to use something like the PHP Beautify. I guess I could write my own, but I was hoping that Rails already had
2006 Jul 19
4
Using Application.rhtml as layout for all controllers
I put my nav system in application layout. that way any controller loading will have the nav system. I have one problem though - the <%= yield %> is in the body, so how would my controllers specify other css files? my application layout would look like this: <html> <head> title css include javascript include </head> <body> nav system <%=yield%>
2006 Jul 27
3
Multiple @content_for_layout in template?
Hi guys, I''m having a few experiments making sites with Rails and I''ve come across a problem. I''ve made a template for the parts of the site that the public will see and it has two main columns in it, a main content column and a thin side column. The content in each of these will change on each page of the site but I''m not exactly sure about how to send
2006 Mar 13
5
What is the matter with content_for_layout?
Here is my layout file: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en"> <head> <title>My Demands</title> <%= stylesheet_link_tag ''ajax_scaffold'', :media => ''all'' %> <%=
2007 Sep 01
2
@content_for_layout or changing default fields on "new" page
Hi all, I test my small Rails apps using SQLite3, but I think the problem appeares in every type of database. . When I create table and scaffolding apps, a HTML view is based on columns types. Everything is OK until I want to change preconfigured behaviour. . I created table with a column of type INTEGER, but I wanted to display check box instead of text field and then save 0 or 1 in database.
2006 Jul 25
6
DRY question (newbie)
Say i want to include the same chunck of text (a menu on a webpage for example) on each page. Is there a method by which I can save the HTML in a text file and call it up later? Is there a better way? I know ruby has "puts" but i can''t use that b/c it does not work with my webhost (dreamhost.com) Any suggestions? -- Posted via http://www.ruby-forum.com/.
2006 Aug 10
6
Partials - asked before never got reply
I''m trying to figure out how multiple partials in one page would be configured when they are based on some action in the controller. As an example - I have a main/welcome page. If someone new or a user not logged in arrives at this page I display both a registration form and a login form. However, if they are logged in then those forms should not show up on that page. Also should
2006 Aug 08
3
Rendering partials based on conditions
Hi, A bit unsure how this gets accomplished - particularly how it might get set up in the layout. Currently - This is my welcome.rthml (what comes up at main page) <% if @u %> <%= render :partial => "main/session" %> <% else %> <%= render :partial => "main/login" %> <%= render :partial => "main/register" %> <% end %>
2006 Jul 13
6
Render partial questions
Hello, what is the preferred way to do this... I have 2 controllers. Each has an index action. Now I want to include the rendered index view from TwoController in the index view of OneController. But a render :partial doesn''t execute the TwoController index action which sets variables for its index view. So maybe you can give me a short example how to do it. Thank you Markus