similar to: Using a different layout/styleshheet

Displaying 20 results from an estimated 7000 matches similar to: "Using a different layout/styleshheet"

2006 Jul 18
7
Observer not working
Help please. I''m trying to observe a User class, but I can''t get this to work, the after_create method never gets called... (the breakpoint never gets called) app/models/user_observer.rb: class UserObserver < ActiveRecord::Observer def after_create(user) breakpoint setting =
2006 Jun 22
4
stylesheet linking and layouts
In my layout, I have something like (shortened for clarity): <html> <head> <%= stylesheet_link_tag "index", :media => "all" %> </head> <body> <div id="site-container"> ... <cut for space> <%= @content_for_layout %> ... <cut for space> </div> </body> A view action has another stylesheet defined
2006 May 24
2
Gallery2 integration
Is anybody working already in a gallery2/rails integration? I need to use it as part of my project, so, before start from scratch with it I''d like to know if already is something out there. Thanks.
2006 Jun 02
5
Firefox extension for ajax debugging
or similar... Is there any extension for firefox so that I can view the source code of ajax returned content? Thanks everybody.
2006 Jun 21
2
raw sql and columns order
Hi, I''ve a model with the following method: def self.run(sql) return connection.select_all(sql) end so, the value returned is an array of hashes... the problen is that the sql command: "select name, id from table" and select id,name from table" returns the columns in the same order (name, id). And in my view, I need to keep the order of the SQL command.
2006 Aug 02
7
String lenth limit
Hi, I''ve seen some time ago a function which, given a string like "this is a very long string" would return , for example limitin it to 10 chars "this is a..." , but I can''t remember where..... I''ve searched throwth the apis of rails and ruby itself and I can''t find it. Thanks everybody..
2006 Jul 18
4
Multiple Layouts - Single Controller
How do I do multiple layouts for a single controller: I am aware I can do... render(:layout =>''mylayout'') for individual actions, however this becomes a multiple render problem. I tried this... layout "mylayout", :except => [:myaction, :myotheraction] layout "myotherlayout", :only => [:myaction, :myotheraction] However that doesn''t
2006 Aug 10
1
reusing previous code
Hi, I have a couple of controllers, views, models and mailers for a given functionality (for example, user registration). ?what is the best way to share them between multiple applications so that I don''t have to copy them over and over again? Thanks.
2006 Mar 12
1
Problem with --partial and rsync algorithm
Hi, I'm running the following command for a remote host backup: /usr/local/bin/rsync -a --delete --delete-excluded -v --timeout=120 -z --no-whole-file -partial --partial-dir .rsync-partial --exclude=/sys/* --exclude=/tmp/* --exclude=/stuff/distfiles/* --exclude=/stuff/sistema/* --exclude=/stuff2/ftp/* --exclude=/stuff2/backup/* --exclude=/home/ftp/* --exclude=/home/gentoo/* --exclude=/mnt/*
2006 Jul 06
6
Class variables in templates/layouts
I''m having problems with class variables.. I have a class: class Content::ApplicantsController < ApplicationController layout "mylayout" @@tab = "mystring" [... the rest is standard scaffold-created stuff ...] and a layout (mylayout.rhtml): [...] <title><%= @@tab.capitalize %></title> [...] And I keep getting this error: uninitialized
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 Apr 12
4
CSS and Javascript with partials and layouts
Hi, I''m developing an application that uses a layout called main on every page. Most of the individual pages are represented with a single partial template, but there are several pages that are composed of multiple partials. My main layout looks something like this: Code: <html> <head> <title><%= @title %></title> <%= stylesheet_link_tag
2005 Dec 27
6
Best Environment for development
This is a newb question, and probably one that is a matter of taste more than objective merit. I''m working on a home server, running Linux [FC 4], hosting a website [look for generocities.com shortly]. I have a delightful new Windows XP Pro Dell Inspiron 9300 laptop. What would the community recommend for the environment in which I develop? I don''t mean technologies like RoR
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
2006 Mar 01
5
scaffold.css and Rails tutorial problem
In iteration D.1 on page 109 I am not getting a styled error message box displayed at the top of the checkout as described in the tutorial and I cannot seem to discover where I have erred. The scaffold.css is copied from the pragmatic programmers site: #-------------------------------------------------------------------- $ cat public/stylesheets/scaffold.css body { background-color: #fff;
2007 Nov 16
3
Route Information
Is there a method to return a hash of the route configuration based on a path? For example: magic_method(''/my_controller/my_action/my_id'') => {:controller => ''my_controller'', :action => ''my_action'', :id => ''my_id''} Thanks! Tom --~--~---------~--~----~------------~-------~--~----~ You received this message
2008 Feb 02
3
Question abt redirect_to..
I found a reference to using attachment_fu and followed the lead of it but having an issue with the redirect_to that renders the fb:render tag - In my form I''m setting the canvas to false, file is being uploaded / save fine but when I attempt to redirect: redirect_to :action => :new, :canvas => true Unfortunatly it looks like my callback URL is getting printed twice, e.g.
2010 Apr 13
5
How to check if a parent has children?
What is the new way to check if a parent has child items? In rails 1.2.6 I did this: if @client.has_line_items? Client being the parent and line_items the children. Now that I have upgraded to rails 2.0.1 (on my way to current :-) ) I am getting this message: undefined method `has_line_items?'' for #<Client:0x7f3b093b01a0> How should I format the query now? Regards, Paul
2007 Feb 21
6
Problem with url_for and https - overrides all options
I have a piece of code like this in one of my views: <%=link_to "link here", :action=>''my_action'', :id=>1 %> It works fine on my local development machine, running Webrick over http and it works fine on my testing server which is running single mongrel instance behind Apache 1.3 as a proxy. On both the outcome link is this: <a
2006 Jan 03
1
RequireResourceHelper for JS and CSS
The following was posted on my blog at http://blog.inquirylabs.com. A friend of mine recently expressed interest in this code snippet, so I thought I''d send it out to anyone else who''s interested. This module makes it a lot easier to ''require'' javascript and cascading stylesheet dependencies inside your views or controllers. By