Displaying 20 results from an estimated 50000 matches similar to: "calling controller method for .rhtml file inside directory"
2006 Aug 02
3
controller methods for app/views/A/B.rhtml
If I want to call A/B, can I call a corresponding controller action for
it?
Like with app/views/A.rhtml, I can it will call the method A in the
controller file.
But with A/B.rhtml, I cant do def A/B.
--
Posted via http://www.ruby-forum.com/.
2006 Jun 02
1
controller instance methods available in rhtml?
In rhtml, you have access to controller. I am trying to set an instance var
in my controller, then retrieve it in my form display. I know I could do
this through one of the hashes I have access to, but I''m trying to
understand why I can''t do it this way.
No matter what, when I try to output from my rhtml either
<%= controller.whynot || ''Unknown'' %> or
2006 Mar 10
1
How to use variables inside rhtml??
Hi,
I want to use counters in my rhtml page for dynamic naming of my form
elements.
eg:- for 1st textbox name will be "text1"
for 2nd textbox name will be "text2"
....& so on........
But here I want use a counter variable in rHtml file so that I will use
for loop for looping througn each set of elements in form & give name to
form elements as
2005 Dec 15
2
.rhtml in the model rather than the controller
Hi, I''m developing a mini-programming language for research surveys.
[code]
question S1 {
label: The first few questions are just to help us categorize you.
label: Do you or does any member in your household work for... (MARK
ONE ONLY FOR EACH.)
grid {
col {
1 Yes
2 No
}
row {
1 An advertising agency
2 A public relations company
3 A marketing research firm or
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 Apr 19
3
include contents of one rhtml in another
Hi
I have a rhtml documment in views/account/login.rhtml
I want to include the contents of login.rhtml in
views/welcome/index.rhtml
any suggestions on how this can be done?
Thanks
Scott
--
Posted via http://www.ruby-forum.com/.
2006 Jun 17
0
cache do and different actions calling the same .rhtml file
Hi,
I have two actions that call the same .rhtml file to print out search
results. One of them simply prints out all available results, and I''d
like to cache those, but if I add ''cache do'' in my .rhtml file, it
caches the search results too, which isn''t ok! Any way around this?
Thanks,
--
David N. Welton
- http://www.dedasys.com/davidw/
Linux, Open
2007 Feb 17
0
Template is missing 'show.rjs.rhtml' error in safari only?
I was able to solve this but want to understand why this fix works.
Solution:
Remove the format.js line from the respond_to block
the error i get when navigating to: /music;accept
Template is missing
Missing template script/../config/../app/views/music;accept.rjs.rhtml
Accept is an aspect of the music controller eg in routes.rb
map.resources :music, :collection => {:accept =>
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 Apr 05
1
select in *.rhtml
I''m trying to get a select box of categories to appear in my items views
after I created everything using generate scaffold, but I can''t get the
categories to appear in my forms.
class ItemsController < ApplicationController
def new
@item = Item.new
@category = Category.find_all
end
...
class Item < ActiveRecord::Base
belongs_to :category
end
class
2006 Aug 01
4
class def error when serving "stand-alone" rhtml files
I''m attempting to set up a rails app so that I can add rhtml files
without having to create controllers for each one. I want a simple
solution to serving static-like rhtml files as well as those with a
little logic. The solution I found is this one:
I added the following controller
static_controller.rb
#####################
class StaticController < ApplicationController
end
I
2006 Jun 08
1
No rhtml, rxml, or delegate template found
hi ,
i''m having a problem with rendering a partial , the partial is in the
apps/view/polls folder with the name : _antwoorden_user.rhtml
in the view i''m rendering it with
<% if @user %>
<%= render :partial => ''polls/antwoorden_user'', :locals => {:poll =>
@poll, :user => @user} %>
<% else %>
....
gives me the error =>
No
2006 Apr 15
1
is it allowed to mix .rhtml and .html
I want to use RoR to perform a simple search function on my site that
contains a lot of (static) .html pages.
Can I mix .rhtml and .html pages on the site? The search box would be on
.rhtml and a rail controller would redirect to the right .html page
Thanks,
Ted
--
Posted via http://www.ruby-forum.com/.
2007 Jan 25
2
render .rhtmlx if present, otherwise render .rhtml
We have a product where our customer is "allowed" to make minor changes
to the .rhtml views.
Obviously, this can be an issue when updating the software, as changes
need to be merged in. Also, sometimes the customer wants to back out
there change but no longer has the original file.
SOOO....
I''d like to tell them
- if you want to change a .rhtml file
- just copy it to
2006 May 30
2
No rhtml, rxml, rjs... problem with Action Mailer, again
Hi all
I have seen a lot of people writing my same problem but I haven''t found
the solution yet. This is the problem:
"ActionView::ActionViewError in Periodico#index
No rhtml, rxml, rjs or delegate template found for..."
when trying to send email through action mailer.
I have created the Notifier.rb model (in app/models/ folder)
def signupthanks(user)
# Email
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 Jan 22
2
Using register_template_handler to serve CSS files (Making ActionView handle .css as .rhtml)
Hi,
I wanted to be able to use some Rails code inside CSS files, so I set up
a controller (StylesController) to serve CSS files that reside inside
the controller''s view folder when the browser requests /stylesheets/:action
So in the controller I just define empty actions with the names I want
my style sheets in (ie: def cooleffects end - that would respond to
2005 Sep 29
0
Single Table Inheritance and rhtml docs
Is there any way to wire the .rhtml files in app/views into Rails''
Single Table Inheritance mechanism?
So given:
class Bar < Foo
The STI mechanism is generating the objects correctly when it hydrates
them out of the db, but when it goes to rendering pages, it pulls
everything from app/views/foo and doesn''t touch app/views/bar.
I can of course hook in manual type-checking
2006 Oct 13
5
multi_search error undefined method
Hi,
Im having problems using the multi_search command. I keep getting the
following error.
"undefined method `<<'' for Book:Class"
here is the code associated with this.
class Book < ActiveRecord::Base
acts_as_ferret :store_class_name => true
end
class User < ActiveRecord::Base
acts_as_ferret :store_class_name => true
end
and the call is the
2006 Jan 27
3
Formatting Data in rhtml
Is there a simple way to format your data in the .rhtml file?
I come from a PHP/Smarty background, and in the templates, I''ve used
what is called "modifiers" to format data.
{$price|currency_format} # displays in currency format
{$description|truncate:"100"} # Truncates the description after 100
characters
It seems like the template (rhtml) would be the ideal