Displaying 20 results from an estimated 60000 matches similar to: "How to integrate layouts?"
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
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/
2006 Jul 05
0
MasterView rails-optimized (x)html friendly template engine - Release 0.2.3
MasterView is a rails-optimized (x)html friendly template engine plugin that
provides another option to the existing rails view templates (rhtml and
rxml). The main idea is to provide a template engine that would provide all
the power of layouts, partials, and rails helpers but still be
editable/styleable in a WYSIWYG editor. It was also a major goal that the
syntax of these attribute directives
2009 May 27
4
Scaffolding Results Format
Hi Everyone,
I built a scaffold and I''m having trouble getting results properly
formatted. (I need to get the data into multiple columns instead of just
one big column) I can''t get all of my CSS to work properly in
scaffold.css, layout/books.rhtml, or the books/index.rhtml.erb Anyways,
maybe you have a suggestion.
Default view (127.0.0.1:3000/books)
Title Abstract
2006 Aug 17
6
NameError in AdminController#index building scaffold
I''m a pretty big newbie with ROR, but when following a tutorial I
encounter an ugly error when building a scaffold. Here is my
environment
Dev system:
- Windows XP
- java version "1.5.0_06"
- MySQL java version "1.5.0_06"
- Ruby 1.8.4
- Ruby Gems 0.9.0
- Gem install mysql
Successfully installed mysql-2.7.1-mswin32
Installing ri documentation for
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;
2006 Aug 12
2
Layouts: application.rhtml v. mycontroller.rhtml
I was trying to be all DRY and standardize my layouts to one file and
made an application.rhtml. There was no application.rhtml at all
before.
So I renamed all my controller layouts to .txt and then tested. I got
empty pages.
I found some issues with Login/UserEngine and application.rhtml, but
nothing that looked like this behavior. Is routing messing me up? It''s
as if
2006 Aug 18
3
Understanding MVC - view customization after using scaffolds
All,
I have ordered AWDWR and am anxiously awaiting its arrival. In the
meantime I still am playing with ROR using radrails. I have a few
questions ...
I create a table named customers with the following details:
Field Type Null Key Default Extra
id int(11) NO PRI auto_increment
customer_name varchar(50) NO
inbound_retention int(11) NO
outbound_retention int(11) NO
unix_admin_email
2007 May 16
0
Unknown action, No action responded to world
<http://localhost:3000/hello/world> gives:
"Unknown action
No action responded to world"
I''m following along with <http://wiki.rubyonrails.org/rails/pages/
Tutorial> and what stands out are statements like:
"Now take a look at app/controllers/hello_controller.rb."
Which doesn''t exist for me, I had to create multiple directories. I
2006 Jun 21
2
MasterView rails-optimized (x)html friendly template engine plugin - Release 0.2.0
MasterView rails-optimized (x)HTML friendly template engine plugin - Release
0.2.0
The MasterView development team is pleased to announce the general
availability of MasterView release 0.2.0. MasterView is a rails-optimized
(x)html friendly template engine plugin that provides another option to the
existing rails view templates (rhtml and rxml). The main idea is to provide
a template engine that
2006 Feb 06
2
basic usage confusion
I am confused. Looking at ''list'' from scaffold, I see a record and click
the ''show'' button. I put in a ''link'' at the bottom of ''show.rhtml'' to my
''view'' rfn2.rhtml - action = ''rfn2'', :id = @placement
I click this link and get error...
log/development.log
Processing
2006 Jun 22
5
Problems with layouts
ruby script/generate controller Tools::Search - ok
in views/layouts/application.rhtml:
<%= render_component :controller => ''tools/search'',
:action => ''searchbox'',
:params => {:context =>
''header-section''}
%>
in
2006 Jul 20
2
Why is my rxml view being wrapped by the rhtml template in views/layouts?
Why is my rxml view being wrapped by the rhtml template in views/
layouts?
I was experimenting with REST, I had a nice little test program with
one table: ''resources''. Here''s what the show method looks like:
def show
@resource = Resource.find(params[:id])
respond_to do |accepts|
accepts.html
accepts.xml
end
end
I have a show.rhtml
2008 Sep 17
2
Layouts and content_for
when i studied the tutorial about layouts & content_for from railscast.I
need a clarification as per their tutorial.
url:http://railscasts.com/episodes/8-layouts-and-content-for
<!- projects/index.rhtml ->
<% content_for :head do %> <= stylesheet_link_tag ‘projects’ %>
< end %>
<!- layouts/application.rhtml ->
<head> <title>Todo List</title>
2006 Jul 07
2
How does layouts work?
When creating a scaffold you get a layout file. How does it work? I
thought I would find the var @content_for_layout in the controller, but
I didn''t. Where is layouts defined or controlled?
--
Posted via http://www.ruby-forum.com/.
2006 Nov 04
0
weird problem with content type
Hey all,
My site is working ok except for a page that displays as text instead of html.
I tried to use this:
puts "Content-Type: text/html"
then it display the page as html normally but I still get that ugly
part on top of my page:
Content-Type: text/html
Set-Cookie: _session_id=6356b18a24d56a0da01bfab791fa911d; path=/
Status: 200 OK
Cache-Control: no-cache
here is the url:
2005 Dec 31
7
Application Errors w/ layout & custom view pages
1) I get Rails Application Error when trying to use layout
test_controller
def list
layout "stdlayout"
end
in the views/test/layouts stdlayout.rhtml
<html>
<head><title>test</title></head>
</body>
<h1>Test</h1>
<%= content_for_layout %>
</body>
</html>
2) I get Rails Application Error when trying to use a separate
2006 Feb 23
5
layouts
I created a controller called reports, for which I didn''t have any model
or tables.
I wanted to use a menu/layout structure similar to all my other
models/controllers and added a layout named reports which then gives me
the menu/layout structure but is also now part of all my reports.
That isn''t gonna work so I renamed reports.rhtml to reports_forms.rhtml
(still inside my
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
2007 Aug 31
2
dynamic layouts from DB
Hello,
I''m trying to get layouts from the database and use it as layout, but
its not working as excepted, it always try to find something from the
layout director
views/layouts/ ___ .rhtml
Even the below code render it as HTML and not ruby code
@layout = Layout.find(:first)
@test = "test"
render :text = @layout.html
Result:
joiasd jioasd ijoaidsoj ajiod <%= @test %>