Displaying 20 results from an estimated 10000 matches similar to: "Layouts: application.rhtml v. mycontroller.rhtml"
2006 Aug 10
2
check_box form helper questions/issues
I''m using Rails 1.1.x and it looks like the check_box form helper
expects me to provide and object and method so it can determine if the
checkbox should be checked or not. I''m having a couple of issues with
this.
note: I''m using UserEngine and adding a HABTM so that:
class User < ActiveRecord::Base
has_and_belongs_to_many :foos
end
class foo <
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
2006 Jul 27
0
Should I be extending UserEngine for User Preferences?
Fairly high level question here.
I''m using LoginEngine & UserEngine with success. My application needs
to track user preferences, which includes some associations with my
models.
Should I be extending the UserEngine model(s) and adding my own
attributes? This means adding a lot to a plugin, including extending
controllers and views.
Or should I be creating my own
2006 May 16
3
application.rhtml ignored
Hi,
I''m stuck. I have an application that''s been working fine. I made some
changes to the database schema and rebuilt my models, ensuring that I
did not overwrite any of the existing controller or view files. Now,
whenever I display *any* of my pages, the layouts/application.rhtml file
is completely ignored. I have *no* idea what''s causing this, and
neither do
2006 Aug 09
3
HABTM and getting to arrays from either direction
I didn''t find exactly an answer on this one, so I''d like to get a
clarification from folks who live & breathe HABTM.
class foo
has_and_belongs_to_many :bars
end
class bar
has_and_belongs_to_many :foos
end
(and yes, I have a bars_foos table in my db)
def test_habtm
bar = Bar.new
foo = Foo.new
foo.bars<<bar
assert !foo.bars.empty?
assert
2006 Jul 13
1
RailsCron usage question
I''m yet another person looking to do some background Rails processing.
>From post & the wiki, it looks like I should be using RailsCron. So I''m
about to start playing.
In parallel, I''d like to get some opinions re: database access. I have
a table that I''d like to re-fresh periodically in the background. Is it
safe, using RailsCron, to be accessing
2006 Jan 17
9
Setting layout template in .rhtml
I''ve a single controller -
class ContentController < ApplicationController end
in the app/views/content folder I have quite a few .rhtml files
I need to be able to choose a different layout template to
use in each of these .rhtml files.
i''d like to be able to do something like (which doesn''t work..)
<% layout ''layout1'' %>
Any
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
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 May 21
3
Where to put partials called from the application layout
Hello,
My main application layout, app/views/layout/application.rhtml looks
like this:
something
render partial_1
something else
render partial_2
something else
render partial_3
The partials are not really doing anything, i use them to keep the
layout modular (i.e . to have ~30 lines instead of 200). Now, the
question is where to put _partial_1.rhtml, _partial_2.rhtml,
_partial_3.rhtml.
If i am
2006 May 16
3
UserEngine and hiding controllers
I''m using LoginEngine + UserEngine for web application.
1. I have some controllers under and admin subdirectory
(Admin::PostController etc). The auto-fill permission in UserEngine
does not work correctly with those controllers.
Right at the moment this is not a problem, since I kind like having the
Admin section separated and available only for god users. However, I
could use
2006 Feb 02
4
How switching global layout (application.rthml <or> custom.rhtml)
Dears,
My railsapp run using ''/layout/application.rhtml'' and under some
conditions ( Authenticated user, url parameter) I like to switch
globally to another layout, let''s say custom.rhtml
Like :
class AppController < ApplicationController
before_filter :context_layout
def index
end
end
# application.rb
def context_layout
if <context_condition>
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
2006 Jun 22
4
rendering partials in layouts?
Hello all,
Forgive me if this is a really stupid question. How do you render
partials in a layout? It''s probably way easier than i believe it to be.
thanks!
--
Posted via http://www.ruby-forum.com/.
2008 Dec 29
2
Source for Kernel
OK, perhaps I wasnt clear in my previous posting.
I am looking for either a SRPM for the CentOS 5.2 centos.plus kernel,
or more likely, a diff from the kernel at kernel.org.
I was pointed to the wiki, which MENTIONED a Source RPM, but didnt
point to anywhere to find these for CentOS. All Ive been able to
find are ISO's .
I really dont need a bunch of tools that will complicate the problem,
2009 Jan 06
2
Anyone got Diskless BOOT working under CentOS ???
Im trying to get a diskless boot set up under CentOS 5.2, and having no luck
at all.
I am to the point of running system-config-netboot, and whatever information
I put in, I get an error message.
Responding to the 2nd button on the first popup, which asks for NFS info,
I put in the IP address of the current machine (the machine that will hold
the boot images for the diskless machine) and the
2010 Oct 27
0
"Missing partial layouts/application" error on render :partial => "index", :layout => "application" - Rails3
This is the second time I have seen this error, and been googling around and
cant find an explanation. This error is happening with Rails 3/1.9.2 and was
not with Rails 2.3.8/1.8.7:
*Template is missing
Missing partial layouts/application with {:handlers=>[:erb, :rjs, :builder,
:rhtml, :rxml], :formats=>[:html], :locale=>[:en, :en]} in view paths
2007 May 23
8
Rails Rendering diagnostics.rhtml in Controller Spec
Forgive me if this isn''t the proper list. It''s specific to the rSpec
Rails plugin.
The problem is, some controller actions are rendering the
"diagnostics.rhtml" template when I''m expecting it to render something
else in a controller spec. I''m assuming this is the template that
displays the error message and a stack trace when an error is raised
in the
2006 Jun 28
3
Autodesk DWG Viewer
Application: DWFViewer.exe
Wine 0.9.14 - mandriva 2006.0
This is Autocad's "free" viewer program for dwf files. I had to install
IE6 first as a pre-requisite. I used the Wine recommended method of
adding that one dll to the windows/system32 directory then ran
ie6setup.exe to install it. The DWFViewer installed fine, but then when
trying to run it this message came up:
This
2006 Apr 27
3
LoginEngine File_column interop
-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160
Hello all,
I hope someone can help me with this issue, I have the SVN
file_column and using LoginEngine/UserEngine with Rails 1.1.2. My
issue is that I''m overloading the view for LoginEngine to support a
file image upload as part of the user record and having a heck of a
time doing so.
Near the bottom of my new _edit.rhtml