Displaying 20 results from an estimated 3000 matches similar to: "scaffold.css and Rails tutorial problem"
2006 Jul 20
7
How do you use :message with validation?
If I do validates_uniqueness_of :name, :message => "It''s not
uniqueeee!!!"
then how do I have it display that message when the check fails?
-Ben Lisbakken
--
Posted via http://www.ruby-forum.com/.
2006 Jan 22
5
has_one not working as expected?
I messed around with Rails for a while last year, but then got busy and
had to drop it. However, I now have time again, so I''m starting to play
around with a simple database schema to model my extensive collection of
photographic material, including equipment, negatives, photographs,
etc. I''m running into an issue with using belongs_to/has_one methods.
Read on for an
2011 Jan 26
13
undefined method `model_name' for NilClass:Class
I am new to Ruby on Rails and have a very simple foreign key example
that is driving me nuts. I am using Rails 3 under Windows Vista and have
two tables: users and user_comments. user_comments.user_id should
point to the user a comment is about.
In my show view for user I have a link to the new method of
user_comments to allow a comment to be created. This throws:
Showing
2009 May 27
1
[PATCH server] UI tweaks for cloud
Initial styling for the cloud, added a few images
Signed-off-by: Jeremy Perry <jeremy.perry at redhat.com>
---
src/app/views/cloud/instance/index.rhtml | 2 +-
src/app/views/layouts/cloud/cloud.rhtml | 9 +-
src/public/images/mystery_cloud2.png | Bin 0 -> 1984 bytes
src/public/images/tab_bg.png | Bin 0 -> 174 bytes
src/public/stylesheets/cloud/layout.css |
2007 Jul 15
0
errors_for
Been playing with merb.
One of the helpers I liked in rails was on form validations. Found
this was real easy to port over, so I thought I''d share.
It doesn''t highlight the field with the error, but it gives that same
nice little div on top.
Say I had an articles controller
def create
@article = Article.new(params[:article])
@article.save!
redirect
2006 Jun 13
7
help with ''error_messages_for''
Greetings,
I''m in the throws of deploying an app on site5, and I''m getting strange
errors. I think I might need to understand how error_messages_for
works.
I get a pretty standard looking error:
"
You have a nil object when you didn''t expect it!
You might have expected an instance of ActiveRecord::Base.
The error occured while evaluating nil.errors
Extracted
2006 Jan 27
17
Multiple Model Validation
Hey All !
I have a form which contains two models. I would like both models to be
validated, but have their validations aggregated on the page.
If I do:
<%= error_messages_for(:model1) %>
<%= error_messages_for(:model2) %>
It puts two big validation blocks on the page. I would like all the errors
from both models, but only in one validation box.
Is this possible ? All my attempts
2006 Apr 08
1
How To ??? change class of DIV
I''m trying to replicate the "green-bar" effect used in the Depot app using Ajax. And I''m almost there ;-) I''m about to set off on the last stage and would appreciate any advice that would set me off in the right direction.
On the page, each record is represented by a <div>. Each <div> has id = "item#{record.id}" with class = either
2006 Dec 04
5
ruby on rails ecommerce tests are failing, but why?
i am working through the Beginning Ruby on Rails Ecommerce book and on
page 101 where it is talking about integration tests, i run
test/integration/book_test.rb and it fails giving me the following
error message:
1) Failure:
test_book_administration(BookTest)
[test/integration/book_test.rb:45:in `add_book''
test/integration/book_test.rb:11:in `test_book_administration''
2006 Feb 09
4
Theme wanted for new Rails CMS
Hi all,
I just finished building a CMS (open source, MIT license, same as RoR)
that is aimed at people with portfolios: graphic designers,
photographers, web developers, etc. Since this fits the Rails
demographic well, and I plan to continue actively developing the
project, I expect it to be a hit. Some features:
* 100% semantic XHTML
* Built on Ruby on Rails
* AJAXified administration
*
2006 Jan 25
1
Flash CSS issues
I''m have issues in IE6 with my CSS for my flash[:notice] and flash[:error].
My CSS is as follows (basically copied from backpack''s CSS file for
testing purposes):
#Flash {
text-align: left;
border: 1px solid #ccc;
padding: 5px 5px 5px 30px;
font-size: 14px;
margin: 0 auto 12px auto;
margin-right: 7px;
}
.login #Flash {
margin-top: 12px;
font-size:
2016 Mar 04
3
vignette index
Dear helpers,
I have multiple vignette files for a package, and I would like to have the "right" order of these files when displayed online. For instance, see below:
https://cran.r-project.org/web/packages/bst/index.html
The order of vignette links on CRAN is different from what I hoped for:
> vignette(package="bst")
Vignettes in package 'bst':
pros
2006 Jul 19
0
Form helpers produce invalid XHTML code!
Hi all
The following scaffold creation form code...
<%= start_form_tag :action => ''create'' %>
<%= render :partial => ''form'' %>
<%= submit_tag "Create" %>
<%= end_form_tag %>
...creates this HTML colde:
<form action="/en/bookings/create" method="post">
<!--[form:artist]-->
2006 Mar 26
1
How to override generated in validation html code?
Hi,
I would like to ask how to override validation functionality in RoR?
In active_record_helper.rb class there is "hardcoded" default html
generated durning validation.
If I will use
{code:ruby}
validates_presence_of :summary, :description
{code}
in my model class, there is html generated:
{code:html}
<div class="errorExplanation"
2006 Dec 12
2
Error message translation
I have a problem with translation of english phrase when an input error
occurs. When I put: error_messages_for("registratie") above my view. I
get the error: "xx errors prohibited this registratie from being saved".
The problem now is, the site is for dutch customers and I would like to
translate this to a dutch phrase. I know I can translate the individual
fields with the
2006 Jun 16
0
rake spec controller test output hideus.
Is there any way to change the output of rake spec fails?
The errors are just totally over the top ugly and not helpful. First
of all the ruby -Ilib line always comes before each test and I find it
distracting. But if an error occurs on something that is not nil it
just gives me the entire contents of that object and that is no small
matter when the object is a HTTP request response.
Here is
2008 Jan 31
3
presenting validation errors via fbml?
Hi Facebookers,
Is there a helper or suggested approach for presenting validation
errors on an fbml form?
Something to translate rails error markup to fbml:error markup?
thanks
Joel
2008 Apr 20
2
mod_rails showing plain text instead of actual page
hello!
i got this forum powered by apache and mod_rails
lately when i create / edit posts, i get plain html text showing up
instead of the actual page.
here''s what i see:
--
Content-Type: text/html; charset=utf-8
Set-Cookie:
_mysite_session=BAh7CzoOcmV0dXJuX3RvMDoKdGl0bGV7BmkVdToJVGltZQ2IDhuAK1UeADoL
%250AdG9waWNzewZpBnU7Bw2HDhuA2%252FZJ7zoJdXNlcmkGIgpmbGFzaElDOidBY3Rp
2009 May 13
1
[PATCH server] Cloud UI V1 (readonly).
This patch creates the shell for much of what the cloud ui will
become. It is focused on layout (lightly fedora themed), accessibility,
and 'bookmarkability'. This layout uses no javascript (that will be
used to enhance interactivity in a future patch). It also introduces
the idea of using a simple table rather than the more conplex js/json
we use in the admin side. Plan here is to
2006 Mar 30
4
possible scriptaculous bug
I have two sortable lists, one after the other. I can drag from the first
to the second but not from the second to the first. The behavior is
consistent if n > 2. For example, I can drag from 1 to 2, 3 or 4 from 2 to
3 or 4 and from 3 to 4, but not in the reverse order: I can''t drag from the
4th list to anything (besides itself). From the third list I can drag only
to itself and 4.