Hey Colin,
thanks for the reply.
I did think to check for that and un-fortunately the html for the
prompt (first option) is not generated at all. It immediately skips
to the first object in the list, just as if the prompt wasn't there at
all.
On Feb 8, 1:43 am, Colin Law clan...@googlemail.com
Just found my problem.
%= collection_select(:Vehicle, box, list, box, box,
I previously had :vehicle. Which I'm assuming wasn't actually being
recognized as Model type due to case. Weird that it still functioned
on the index but broke on the show.
Either way it works now. Weird little glitch I
Ive searched this group and google Groups and hope this topic
will get approved since ruby on rails tak seems the only place I could
ask.
CURRENT SITUATION:
Currently Im using a Plesk, PHP, Ruby Enterprise VPS with the plesk
for managing customers ( email, passwords, etc )
Mainly all my websites
Very cool! Thanks for the answer. But inverse associations are only a
component of those double sided polymorphic associations.
At the present you can only make one sided associations. Table talking
it means the following:
Single sided polymorphic:
---
Hello everyone, I've recently installed Rails 3 and beginning using
it, but I found something strange: With a simple app, with no
additional gems required I test using REE and all rails commands
(rails server, rails g, rails console, rake db:wtv and all) work
properly. But when i test the same app
I've almost entirely converted a rails 2.3.5 app to 3pre. I'm having
some trouble with protect_from_forgery. I had protect_from_forgery set
in application_controller.rb, but run some uploadify ajax stuff in one
of my controllers, where I had protect_from_forgery, :except
= :add_file set.
In rails
Did you get this solved I have similar issue and am stuck
On Feb 4, 9:28 am, RonL rlamb...@gmail.com wrote:
I attempted to install rails, with these error messages:
$ sudo gem install rails
ERROR: Error installing rails:
actionpack requires rack (~ 1.0.0, runtime)
$ sudo gem
So I have implemented my own version of dynamic drop down menus. (This
is my first rails project nearing an end. Feel free to point out
better methods, criticism taken construction-ally)
So one thing to keep in mind with the drop downs are they don't have
to be used in a linear fashion. The three
Hi Everyone,
I've been using Ruby roughly since 2003, but I never could understand
Rails nor do something meaningful with them.
At last thanks to wonderful people from Rails Guides at
http://guides.rubyonrails.org/getting_started.html I began to
understand Rails.
At the moment I am trying to do
On 09 Feb 2010, at 09:45, rubybox wrote:
CURRENT SITUATION:
Currently Im using a Plesk, PHP, Ruby Enterprise VPS with the plesk
for managing customers ( email, passwords, etc )
Mainly all my websites use a custom account for each customer with its
own /httpdocs to serve the php files from (
On Feb 9, 9:20 am, Bigos ruby.obj...@googlemail.com wrote:
So here are my questions:
1 Is it appropriate to put such code here?
No. You don't really want any code in your view, other than the very
bare minimum. Sounds like you want to put a l lot of this in a view
helper
2 how can I
On Feb 9, 9:24 am, Frederick Cheung frederick.che...@gmail.com
wrote:
On Feb 9, 9:20 am, Bigos ruby.obj...@googlemail.com wrote:
So here are my questions:
1 Is it appropriate to put such code here?
No. You don't really want any code in your view, other than the very
bare minimum.
ActiveRecord supports one-to-many polymorphic associations but not
many-to-many polymorphic associations. Thats what I wanted.
I emulate that behavior like this:
We have three models: - Article, Asset and Relationship
class Article PolyRecord
habtm_polymorphs [:assets]
end
class Asset
Hi
http://fotolink.adeveam.co.uk/login
user name: admin
password: pass
try this
if u find this ok ask me a customised CRM.
Regards,
Shyam
+91-971-618-9650
sh...@crypsis.net
On Tue, Feb 9, 2010 at 2:15 PM, rubybox voorr...@gmail.com wrote:
Ive searched this group and google Groups and
I have installed YM4R/GM plugin. I'm using Rails 2.3.5. After
installing, i could'nt start my application. it shows,
Application error
Rails application failed to start properly.
--
You received this message because you are subscribed to the Google Groups Ruby
on Rails: Talk group.
To post to
On Tue, Feb 9, 2010 at 05:40, tsenart tsen...@gmail.com wrote:
ActiveRecord supports one-to-many polymorphic associations but not
many-to-many polymorphic associations. Thats what I wanted.
I emulate that behavior like this:
We have three models: - Article, Asset and Relationship
class
On Mon, Feb 8, 2010 at 23:37, Erol Fornoles erol.forno...@gmail.com wrote:
On Feb 9, 11:48 am, PsiPro arjes...@gmail.com wrote:
Hello all,
I need to create a object history, as I'll have multiple editors for a
site i am working on. Of course it would be great to have the ability
to restore
On Mon, Feb 8, 2010 at 3:51 PM, rodrigo3n rodrig...@gmail.com wrote:
Hello everyone, I've recently installed Rails 3 and beginning using
it, but I found something strange: With a simple app, with no
additional gems required I test using REE and all rails commands
(rails server, rails g, rails
actually, this is not what i want to do ;)
sorry my poor english sentences made you misunderstand it.
okay.
if there is a general website like amazon, the site has plenty of
javascript function.
the one of them is func_a() function what I want to call it.
in my local,
there is a ruby script
No matter how much disadvantages and quirks I think Plesk and cPanel
have, if you want to provide your customer with a fancy pancy control
panel that they can understand and you can manage easily, using either
one of those is a necessary evil.
Best regards
Peter De Berdt
I use
following code might help you
% if rails_condition%
script
func_a(arg1,arg2,arg3);
/script
%end%
Regards,
Naren
On Tue, Feb 9, 2010 at 5:21 PM, junyoung kim li...@ruby-forum.com wrote:
actually, this is not what i want to do ;)
sorry my poor english sentences made you misunderstand it.
On 09 Feb 2010, at 13:10, rubybox wrote:
No matter how much disadvantages and quirks I think Plesk and cPanel
have, if you want to provide your customer with a fancy pancy control
panel that they can understand and you can manage easily, using
either
one of those is a necessary evil.
Best
On Feb 8, 1:13 pm, Ralph Shnelvar li...@ruby-forum.com wrote:
What, exactly, does
ECONNABORTED: An established connection was aborted by the software in
your
host machine.
mean?
So ... let's start with the most basic of questions: What's a
connection?
The two-way communication between
Erol Fornoles wrote:
On Feb 9, 11:48�am, PsiPro arjes...@gmail.com wrote:
Thanks,
Brian
There's http://wiki.github.com/collectiveidea/acts_as_audited/. That
might work for your use case.
Yup. Or put something similar in a trigger. More work but more
airtight.
Best,
--
Marnen
On Feb 8, 9:16 am, Marnen Laibow-Koser li...@ruby-forum.com wrote:
Andrew France wrote:
On 09/02/10 01:32, Marnen Laibow-Koser wrote:
Andrew France wrote:
Hi,
I was thinking whether it would be more elegant for a view to call
methods on the controller rather than rely on instance
rubybox wrote:
No matter how much disadvantages and quirks I think Plesk and cPanel �
have, if you want to provide your customer with a fancy pancy control �
panel that they can understand and you can manage easily, using either �
one of those is a necessary evil.
Best regards
Peter De
db_333 wrote:
Yes, this was helpful, and I appreciate it. Thanks for your reply.
On Feb 8, 11:29�pm, Gianluca Tessarolo
You probably don't want acts_as_tree in any case. Awesome_nested_set is
much more efficient.
Best,
--
Marnen Laibow-Koser
http://www.marnen.org
mar...@marnen.org
--
Rails ROR wrote:
Hi all,
I want to display the list of all twitter user names.'
Please suggest me something on that
Read the Twitter API docs. This has nothing to do with Rails, though
Twitter-Auth is great for connecting Rails to Twitter.
Getlists is a method which i have seen it
Mat Brown wrote:
On Tue, Feb 9, 2010 at 05:40, tsenart tsen...@gmail.com wrote:
�habtm_polymorphs [:articles]
� �rev = Relationship.new :origin = self.destination, :destination
�def self.habtm_polymorphs(associations, options={})
� �has_many pjoin, :as = pfrom
� � �})
� � � �args =
On Feb 10, 12:09 am, Adam Stegman adam.steg...@gmail.com wrote:
On Feb 8, 9:16 am, Marnen Laibow-Koser li...@ruby-forum.com wrote:
Andrew France wrote:
On 09/02/10 01:32, Marnen Laibow-Koser wrote:
Andrew France wrote:
Hi,
I was thinking whether it would be more elegant for a view
Robert K. wrote:
Hey,
checkout Selenium (http://seleniumhq.org/). You can use that with webrat
and/or cucumber to test javascript within your browser.
Robert
Hi Robert,
Thanks for your reply.
I have heard of it and will definitely give it a shot.
Thanks a lot!!
--
Posted via
Andrew France wrote:
On Feb 10, 12:09�am, Adam Stegman adam.steg...@gmail.com wrote:
The trouble with this is that controller methods are actions, not
controller code. �Anything else belongs in a model or a helper.
I completely agree with Marnen. Fat models, skinny controllers.
Your
Kyle wrote:
Upon closer inspection, it was discovered that reCAPTCHA information
was not being submitted with the form. Form elements were aligned in
a table (I know, I know...but it usually works so well...).
And now the lecture: don't use tables for alignment under any
circumstances.
On Tue, Feb 9, 2010 at 4:31 AM, Bigos ruby.obj...@googlemail.com wrote:
On Feb 9, 9:24 am, Frederick Cheung frederick.che...@gmail.com
wrote:
On Feb 9, 9:20 am, Bigos ruby.obj...@googlemail.com wrote:
So here are my questions:
1 Is it appropriate to put such code here?
No. You don't
That looks like what I was planning on doing, but a little light on
the changed details.
Unless anyone has any other suggestion I'll just have to write my own.
Brian
On Feb 8, 11:37 pm, Erol Fornoles erol.forno...@gmail.com wrote:
On Feb 9, 11:48 am, PsiPro arjes...@gmail.com wrote:
Hello
When I amended my registration page, I included the digest to encrypt
the password in the database.
If someone forgets their password, how do I get this mailed back to
the user?
The action is as follows:
def remind
@title = Remind Me!
if param_posted?(:user)
email =
Is there a way to specify within a model that an association should
always be loaded. For example, the classic example from the API docs:
Post.find(:all, :include = :author)
What if I ALWAYS wanted the author to be loaded whenever a Post object
was created? So, in essence, Post.find(:all)
You can set up a default scope:
http://ryandaigle.com/articles/2008/11/18/what-s-new-in-edge-rails-default-scoping
Mat
On Tue, Feb 9, 2010 at 09:59, TomRossi7 t...@themolehill.com wrote:
Is there a way to specify within a model that an association should
always be loaded. For example, the
If you are using a one way hash, like 'digest/sha1', then you will not
be able to decrypt the password. You can only reset it to something
the system knows then send that password to them.
On Tue, Feb 9, 2010 at 6:54 AM, RubyonRails_newbie
craigwest...@googlemail.com wrote:
When I amended my
how would I go about resetting the password for the user to then go
ahead and change to something more memorable?
Is there a tutorial about this, or can you explain how this is
achieved?
Kind Regards
On 9 Feb, 15:06, Curtis Cooley curtis.coo...@gmail.com wrote:
If you are using a one way hash,
PsiPro wrote:
That looks like what I was planning on doing, but a little light on
the changed details.
What are you referring to? Please quote when replying; we can't read
your mind. :)
Unless anyone has any other suggestion I'll just have to write my own.
There are others -- for
Craig Westmoreland wrote:
how would I go about resetting the password for the user to then go
ahead and change to something more memorable?
Is there a tutorial about this, or can you explain how this is
achieved?
If you're using Authlogic, this is trivial and explained in the docs
IIRC.
On Tue, Feb 9, 2010 at 7:14 AM, RubyonRails_newbie
craigwest...@googlemail.com wrote:
how would I go about resetting the password for the user to then go
ahead and change to something more memorable?
Is there a tutorial about this, or can you explain how this is
achieved?
Not sure if there
On Feb 8, 2:04 pm, Ralph Shnelvar li...@ruby-forum.com wrote:
Ok, I think I understand why RoR will flag an attempt double render in
an action.
What I don't understand is the philosophy of render and redirect_to.
Specifically, why isn't a return implicit in both those methods?
Unless I've
hi-
is this possible? basically, i have a simple search text box whose
contents i want to send to my server to suggest a query. that
suggested query will be in turn retrieved from a 3rd party API. I
cannot figure out for the life of me how to use
text_field_with_auto_complete without a model.
On Feb 8, 2:52 pm, Rob Biedenharn r...@agileconsultingllc.com wrote:
(but I agree that you should get the logic out of the view if
possible. Perhaps in a helper?
He should get the logic out of the app *entirely*. This is the exact
use case for IE's conditional comments:
You may want to take a look at vestal_versions:
http://github.com/laserlemon/vestal_versions
Haven't used it myself, but looks to be able to revert objects to
pretty much any previous version *and* show what changed between
arbitrary pairs of versions.
--Matt Jones
On Feb 9, 9:47 am, PsiPro
Matt Jones wrote:
You may want to take a look at vestal_versions:
http://github.com/laserlemon/vestal_versions
Haven't used it myself, but looks to be able to revert objects to
pretty much any previous version *and* show what changed between
arbitrary pairs of versions.
--Matt Jones
Useful link I found:-
http://joshhuckabee.com/jquery-rails-3
On Feb 8, 9:56 am, overture phil.mccl...@gmail.com wrote:
Hi All,
Does anyone know if there are any good examples of how to use the
unobtrusive javascript functionality in Rails 3. I've read the
release notes but I can't seem to
On Tue, Feb 9, 2010 at 10:35 AM, overture phil.mccl...@gmail.com wrote:
Useful link I found:-
http://joshhuckabee.com/jquery-rails-3
Does the HTML5 stuff in Rails3 degrade to something else for browsers
that don't support it yet? I've read all the Rails3 news I can find
but don't see this
I don't think that Rails 3 is using anything that wouldn't already be
supported by older browsers. It's not like it's sticking in canvas by
default, just using some special named parameters. A large goal with HTML5
was backward compatibility.
--
You received this message because you are
How do I store the value of multiple checkboxes as a result of using
check_box helper in a Search class? A Search class is explained
here: http://railscasts.com/episodes/111-advanced-search-form. For
example, a user should be able to search for all Gay OR Bisexual
users by clicking both
Hey Bryan, please do report a bug on Lighthouse. Let's get that fixed
up for the next beta.
Thanks!
jeremy
On Mon, Feb 8, 2010 at 7:24 PM, bshelton229
br...@sheltonopensolutions.com wrote:
I've almost entirely converted a rails 2.3.5 app to 3pre. I'm having
some trouble with
Hi Marnen,
Thank you so much for pointing me to using a Search class. I watched
the screencast on this
http://media.railscasts.com/videos/111_advanced_search_form.mov
and realized this is what I should do so that the app can remember a
user's search.
My question now is How do I store the value
You may want to take a look at vestal_versions:
http://github.com/laserlemon/vestal_versions
Haven't used it myself, but looks to be able to revert objects to
pretty much any previous version *and* show what changed between
arbitrary pairs of versions.
--Matt Jones
I have to agree, that
Thanks :-)
--
You received this message because you are subscribed to the Google Groups Ruby
on Rails: Talk group.
To post to this group, send email to rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscr...@googlegroups.com.
For more
Marnen,
thanks for your feedback.
Indeed, I'm a newbie ruby programer. I'll keep your advice in mind.
I was just hoping I could run the method from the debugging console
and check the output directly.
On Feb 8, 11:23 pm, Marnen Laibow-Koser li...@ruby-forum.com wrote:
lukas wrote:
Hello
shaper wrote:
shaper wrote:
And using Firebug to look at the javascript that's returned, I get
this:
map.setCenter(#Ym4r::GmPlugin::GLatLng:0xb7530778,12);
which makes it pretty clear that the GLatLng object is having to_s
called on it rather than the ym4r's
Hi Lukas,
You definitely can, by adding some temporary debug puts calls
interspersed in your method, and then calling your method either
using ./script/runner or from within a ./script/console session.
To make that method easier to test, I'd relocate that method outside
of
lukas wrote:
Marnen,
thanks for your feedback.
Indeed, I'm a newbie ruby programer. I'll keep your advice in mind.
OK. You're most welcome.
I was just hoping I could run the method from the debugging console
and check the output directly.
You can. And I explained how. script/console
I want to do simple stuff. In my controller I have this:
render :update do |page|
page.replace_html 'scripts', :partial = 'scripts', :locals =
{:question = @question}
end
And in the partial I have this:
% if question.sound %
Sound loaded!
script
Yuri Albuquerque wrote:
I want to do simple stuff. In my controller I have this:
render :update do |page|
page.replace_html 'scripts', :partial = 'scripts', :locals =
{:question = @question}
end
And in the partial I have this:
% if question.sound %
Sound loaded!
script
Hello all,
I'm on my 4th month with Ruby on Rails. I'm doing good, I think, but
have a long way to go.
I have an array with several IDs.
Array
[1,4,6,10,40]
I wish to perform a find() on a Model, on each of these IDs, then be
able to send the results to a view.
Thank you for any help on this.
I found the answer- you put a text_field_tag in first and then the
autocomplete div, and then auto_complete_field
%= auto_complete_field text_box_id, :url = {:action =
'auto_complete'}, :method = GET %
(the method part fixes the invalid token problem)
hope this helps someone down the
I am upgrading a 2.1 Rails app and ran into a problem with the new way
that before_* callbacks are being wrapped in a transaction.
I have a model that has a before_create callback which charges the
customers credit card. If the transaction is successful it returns
true, and if not, false so that
Well,
I found out that I just do this...
m = Array
Model.find(m)
That gives me my results.
Thanks,
John
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups Ruby
on Rails: Talk group.
To post to this group, send email to
if you use google or yahoo's search autocomplete, you'll see that they
do not select the first item automatically. this way, if you don't
choose an item, and hit return, the return submits the form. is there
a way to make this work with auto_complete?
in other words, i'd like it to behave like
iwars...@stripey.net wrote:
I am upgrading a 2.1 Rails app and ran into a problem with the new way
that before_* callbacks are being wrapped in a transaction.
I have a model that has a before_create callback which charges the
customers credit card. If the transaction is successful it returns
I hve a relationship like this in my model:
Student
has_one :student_fail
StudentFail
belongs_to :student_fail_state
belongs_to :student
StudentFailState
has_many :students, :through = :student_fail
has_many :student_fails
In terms of the controller, what would be the best way to update
Maybe there will be some good examples available soon. Hope so.
--
You received this message because you are subscribed to the Google Groups Ruby
on Rails: Talk group.
To post to this group, send email to rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to
i did find this solution, but i'm not crazy about it:
https://prototype.lighthouseapp.com/projects/8887/tickets/116-ajaxautocompleter-default-selects-first-item
On Feb 9, 3:18 pm, dino d. dinodorr...@yahoo.com wrote:
if you use google or yahoo's search autocomplete, you'll see that they
do
http://ryandaigle.com/articles/2009/2/1/what-s-new-in-edge-rails-nested-attributes
On Tue, Feb 9, 2010 at 15:37, John Merlino li...@ruby-forum.com wrote:
I hve a relationship like this in my model:
Student
has_one :student_fail
StudentFail
belongs_to :student_fail_state
belongs_to
Hi Jeff,
have you tried Railroad?
http://railroad.rubyforge.org/
Cheers,
Roman
On 5 Feb., 20:00, Jeff Pritchard li...@ruby-forum.com wrote:
I'm working with other people on a Rails project with a fairly deep
set of interconnected data.
This is the first time I've tried to discuss data
sorry, I've overseen, that you already got the proposition for
railroad.
Roman
On 9 Feb., 22:14, wowo08 rsladec...@gmx.de wrote:
Hi Jeff,
have you tried Railroad?
http://railroad.rubyforge.org/
Cheers,
Roman
On 5 Feb., 20:00, Jeff Pritchard li...@ruby-forum.com wrote:
I'm working
sorry, I've overseen, that you already got the proposition for
railroad.
Roman
On 5 Feb., 20:00, Jeff Pritchard li...@ruby-forum.com wrote:
I'm working with other people on a Rails project with a fairly deep
set of interconnected data.
This is the first time I've tried to discuss data
In case anyone else comes across this again, I had a similar problem
when trying to create a wsdl and my browser telling me a template was
missing.
If you add the following to config/environments.rb
module SOAP
SOAPNamespaceTag = 'env'
XSDNamespaceTag = 'xsd'
XSINamespaceTag = 'xsi'
end
In case anyone else comes across this again, I had a similar problem
when trying to create a wsdl and my browser telling me a template was
missing.
If you add the following to config/environments.rb
module SOAP
SOAPNamespaceTag = 'env'
XSDNamespaceTag = 'xsd'
XSINamespaceTag = 'xsi'
end
Hi there
I'm new to ruby on rails and I need some help with amending a view i
created using partials. I need to create a booking form that allows me
to enter a business name, address and category and i created three
different views, tables etc using scaffolding (I did this as I needed
separate
Cubiware jest spółka zajmująca się tworzeniem oprogramowania dla
urządzeń interaktywnej telewizji cyfrowej oraz internetowej. Firma
współpracuje z klientami i partnerami zagranicznymi, a nasze
oprogramowanie jest używane w USA, krajach Europy Zachodniej oraz w
Azji. Naszymi Klientami są producenci
Hi all,
I have the same problem here...
Did you found any solution?
ty
On 30 dez 2009, 18:34, Ahmed Abdelsalam li...@ruby-forum.com wrote:
Hi,
I have a problem running Mongrel, I'm using the latest ruby 1.9 and
rails 2.3.5
when I start the server (I'm using Aptana IDE), on mongrel, here
Hello, I need to create a application wich registereds users have
yours passwords expired after 15 days in order that I can generate a
new password and send them by email.
Tanks,
Sorry, my english no good.
--
You received this message because you are subscribed to the Google Groups Ruby
on
On Feb 9, 8:14 pm, iwars...@stripey.net iwars...@gmail.com wrote:
I am upgrading a 2.1 Rails app and ran into a problem with the new way
that before_* callbacks are being wrapped in a transaction.
I have a model that has a before_create callback which charges the
customers credit card. If
Not sure what's causing the problem, but I think thin and passenger
are pretty widely preferred over mongrel these days -- might want to
give one of those a shot.
On Tue, Feb 9, 2010 at 16:29, Alessandro Queiroz
alessandro...@gmail.com wrote:
Hi all,
I have the same problem here...
Did you
Hola a todos,
Soy nueva en rails.
Lo que quiero es dentro de un form_for segun lo que se seleciona de una
lista se muestra una parte del formulario o otra. He esta buscando y
rebuscando y he entendido que se puede hacer usando un observe_field que
llame a una plantilla rjs y replace_html para
Hi Everyone...
I'm following a railscast episode on how to implement an invitation
feature.
It's going really well, but i've hit a minor snag that I cant get
over..
undefined method `generate_token' for #Invitation:0x2563bf8
The invite form allows me to check for a user, and whether they
I could solve the issue by restarting my Webrick server.
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups Ruby
on Rails: Talk group.
To post to this group, send email to rubyonrails-t...@googlegroups.com.
To unsubscribe
Thanks Jeff,
it worked. We've been able to test the whole stack of methods. :)
And I've learned something today.
Regards
Lukas
On Feb 9, 8:44 pm, Marnen Laibow-Koser li...@ruby-forum.com wrote:
lukas wrote:
Marnen,
thanks for your feedback.
Indeed, I'm a newbie ruby programer. I'll
So I have been trying to follow the instructions on
http://www.debian-administration.org/articles/329 to get rails to be
running properly on my Debian machine, but I have been running into
several issues. The first one just being the version of RubyGems in the
Debian repos doesn't seem to work
Hi, there.
I have two validations in the model:
validates_numericality_of :value, :only_integer=true,
:allow_blank=true
validates_size_of :value, :is=9, :message=must be 5-digit number,
:if=Proc.new{|u| u.value.is_a?(Numeric)}
They work as expected except when the :value is character/string like
Hi all
I've got a problem that's been bugging me for a while now. We have a
page of news article summaries with links to the full article (pretty
standard sort of thing). When we create new articles in production
they appear in the admin index but they don't show on the public index
for some
I have a version of the book with something that looks like a circular
stamp on the cover that says Covers Rails 2.0, so I guess it has
been updated. ;)
And I would have to agree with Marnen. It looks like you have a
routing issue.
Cheers.
Mine has it, too. The author clarifies in
validates_numericality_of :value, :only_integer=true,
:allow_blank=true
validates_size_of :value, :is=9, :message=must be 5-digit number,
:if=Proc.new{|u| u.value.is_a?(Numeric)}
Try it as u.is_a?(Numeric)
--
You received this message because you are subscribed to the Google Groups Ruby
on
E. Litwin wrote:
validates_numericality_of :value, :only_integer=true,
:allow_blank=true
validates_size_of :value, :is=9, :message=must be 5-digit number,
:if=Proc.new{|u| u.value.is_a?(Numeric)}
Try it as u.is_a?(Numeric)
Thanks Litwin.
I tried that before but it made the second
Is there a way to use accepts_nested_attributes_for to update another
table from within a controller. For example, I have this in my students
controller:
def student_fail
@student = Subject.find(params[:id]) if params[:id]
@student.build_student_fail
end
def student_fail_finalize
if
John Merlino wrote:
Is there a way to use accepts_nested_attributes_for to update another
table from within a controller. For example, I have this in my students
controller:
def student_fail
@student = Subject.find(params[:id]) if params[:id]
@student.build_student_fail
end
def
DC wrote:
I created that controller as MyTest (following instructions from
onlamp, which uses the address MyTest in its example)...did
something change in recent versions of Rails where the address of a
controller is meant to be in lowercase?
Apparently so. Current practice is that
Hi
I am new to using authlogic . My requirement is in Login page I
have a check box which says Keep me logged in for 2 weeks . But I
dont know how to implement this. I have just seen remember_me_for in
the doc. But did not understand how to use it. Could anyone please give
an
example to use
You should specify where @user is defined, otherwise it looks like an
undefined variable issue. You haven't defined @user in the code you
pasted. Most authentication schemes define the current logged in user
as current_user or User.current. Are you defining it as @user?
On Feb 9, 6:05 pm,
Hi Guys,
I am a ruby programmer and want to have a crack on building a online
store website (eg.tshirt, pants, etc) using ruby on rails as it will be
a known territory for me rather than learning php, etc.
Anyways, I found heaps of gem like spree which will help me accomplish
what I want to do on
Rails Girl wrote:
Hi,
Is this RailsList now available on GitHub...?
Pl. provide a direct link for GitHub... What are the next features that
would be added up to this RailsList...?
Thx
Yep - http://github.com/railslist/craigslist-clone
let me know if there any issues downloading it.
1 - 100 of 111 matches
Mail list logo