Displaying 20 results from an estimated 10000 matches similar to: "filter collection based on field value in the index.rhtml"
2008 Mar 17
2
sort the collection in the index.rhtml
Hi,
i am using rails 1.2.6 please forgive me as this application is live
and i could not find the time to move it to rails 2.0
i have a index.rhtml for items
item has 3 attributes other than id, they are name, category and size
current status =>
inside the index.rhtml
i obviously already display my data as below:
name category size
a mugs L
aa mugs M
abc
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
2006 Mar 28
2
Homepage as index.rhtml, not index.html?
Hi all,
I''m building my first Rails app. Please forgive my ignorance as I get
acquainted with the technology.
What I''d like to do is have a form that the scaffolding created for me
appear on my home page. It''s just one text field, a submit button, and
some error messages.
I first tried to copy the code from the new.rhtml view into the homepage
(index.html), then
2006 May 30
3
collection.each { |x| puts x} in rhtml?
Been trying to use the short format for a collection in rhtml, i.e.
<% collection.each {|x| puts x} %>
Doesn''t seem to work though [outputs nothing]
?
--
Posted via http://www.ruby-forum.com/.
2009 May 24
3
index.erb vs rhtml
I am a total Ruby/RoR n00b having just started reading the ''Ruby on
Rails Bible'' book two days ago. I''ve been trying to work out through
the introductory ''Your first ruby on rails application'' section, but
I''ve run into problems already!
The book goes on about creating the view templates and naming them
with the *.html.erb extension, but I get
2005 Mar 07
3
Tons of shiny new stuff
Ok despite this crazy flu which got me last week i was able to get
some coding done.
Here goes:
== Hieraki
Hieraki got plenty of improvements next to the rails 0.10 update. The
biggest new features are proper yaml, html and readme export. But
there are also plenty of new code improvements like the switch to my
favorite postback style for all controllers. Hieraki traditionally
serves as a demo
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 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 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
2005 Jan 29
4
problem with postback generator on 0.9.5
I''m trying to call the postback generator on rails 0.9.5. I''ve
installed the postback tarball into
gems/1.8/gems/rails-0.9.5/generators/postback as it seems like it is
supposed to be. At least, I installed the login generator the same way
and it works. But when I try to run it, I get this:
[carl@e236014 test]$ ruby script/generate postback
2006 May 01
0
Same .rhtml and partial in mailer and non-mailer contexts
I have an ActionMailer template that properly generates HTML email. It
contains a partial.
The mail action was called via the following in my controller:
def cmasend
@cmaform = Cmaform.find(params[:id])
Mailer.deliver_cma(@cmaform)
flash[:notice] = ''CMA Sent.''
redirect_to :action => ''list''
end
Then, in order to allow a
2006 Mar 03
0
render_component in application.rhtml
I''m using application.rhtml as the common layout for all controllers in
my app. I want to add navigation links inside the header portion of
each page and this section is in the application layout
(application.rhtml). The navigation links also include inforation like
username and a link to logout if the user is logged in, or link to
login...standard stuff.
Anyway, i have controller
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 Apr 22
2
Ferret C Indexer Error: Fields not stored in index?
Hello,
I am trying to get Ferret''s C indexer to work on OpenSUSE 10 and
fastcgi.
Indexing documents appears to work correctly but when I try to display
the results I recieve the following error:
ActionView::TemplateError (undefined method `string_value'' for
stored/uncompressed,indexed,tokenized,<title:Revit.jpg>:Ferret::Document::Field)
on line #17 of
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
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 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 Feb 28
2
Comment out RHTML code?
I''d like to be able to comment out a few lines of RHTML code easily.
With HTML you can just surround the code in <!-- ... -->, but if you
do that with the RHTML, it still gets executed, then the resulting
HTML is commented out. Sometimes I''d like to be able to leave the
code in but not have it evaluated..usually just for quick tests, but
sometimes I want to take the
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