Prashant Katare wrote:
Hi all,
I want to clear password field and confirm password field after
both are not match.currently both field cotain data after both are not
match.
Is there any way of doing this?.
Thanks
Prashant
Hi all,
I got the answer:
I used :value=
Hey all,
I'm learning rails and am trying to put together a generic ACL check
for all models. I've been able to sucessfully implement it as a
method for all models by decorating ActiveRecord::Base. But when I
try to do the rails way of creating an association (and thereby
taking advantage of
Hi,
when i do rails myfirstrailsapp at the command prompt on windows...i
get the error Permission denied - myfirstrailsapp/public/javascripts/
prototype.js. what should i do now?
I am using ruby 1.8.6 (2008-08-11 patchlevel 287) [i386-mswin32]
gem 1.3.4
rails Rails 2.3.2
Windows vista bussiness
Hi all,
I accidentally generated a scaffold called reference, not realizing
references was apparently a reserved word in MySQL. I thought I could
get away with it, since the scaffold itself seemed to be working, but
now I'm getting an error that suggests Rails doesn't like this
scaffold name.
The versoin of rails I used is 2.0.2. I want rails work with
streamlined.
At first, I should install streamlined.
I try:
ruby script/plugin install git://github.com/relevance/streamlined
It says: Plugin not found: [git://github.com/relevance/streamlined]
And it appears an empty folder
Hi All,
I am getting undefined method `is_readable_by' in
restful_acl.
any idea how to fix this?
Thanks,
Shahroon
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Ruby
on Rails: Talk group.
To post to this
Are you running your server with 'script/server' command?
On Thu, Jun 25, 2009 at 12:25 PM, Vivek vivek...@gmail.com wrote:
Hi,
when i do rails myfirstrailsapp at the command prompt on windows...i
get the error Permission denied - myfirstrailsapp/public/javascripts/
prototype.js. what
Hi,
I am new to Ruby on Rails. I am trying to integrate Google Map with Ruby
on Rails, and I am totally stuck. I can initiate the map centered at a
hardcoded lat and lng in my index view, with other locations displayed
within 25 miles.
However, I am not sure how to update the current map with
Thanks, for reply !
following trick worked for me...
I created one hidden div outside form tag and while submitting form appended
unnecessary div ( with form elements )
to the hidden div outside form tag.
JavaScript method
outer_hidden_div.appendChild( unnnecessary_div_inside_form_tag )
On Jun 25, 1:07 am, Omega atrau...@gmail.com wrote:
Currently, calling check_acl on either an instance of a model or the
model class itself functions as expected. But attempting to call
acl_check (my named_scope), just results in a method not found.
So you're trying to call a named scope on
2009/6/24 John Woods john.wo...@marcottelab.org:
Hi all,
I accidentally generated a scaffold called reference, not realizing
references was apparently a reserved word in MySQL. I thought I could
get away with it, since the scaffold itself seemed to be working, but
now I'm getting an error
I have installed Image_magick,rmagick and scruffy for creating graphs in
ruby application.
whenever i am trying to run the .rb file it is showing
core_rl_magick_.dll not found.
Then I uninstalled all the gems amd image magick and reinstalled and
re-started the system but it is of no use.
Please
Adam wrote:
HI!! I'm sure you've moved on, but if anyone comes in behind me,
here's a decent, and painless workaround - you need to nullify all
will_paginate links, and manually change them to submit your current
form. Oh, and you need to create a textbox to hold the page, so
will_page
Andrei Don wrote:
I have the following models:
class Order ActiveRecord::Base
belongs_to :billing_address
belongs_to :shipping_address
accepts_nested_attributes_for :billing_address
accepts_nested_attributes_for :shipping_address, :reject_if = proc {
|attributes|
I solved my problem by passing the actual object in readable method. And I
was also facing problems while using
is_readable_by(user, object = nil)
is_readable_by(user, parent = nil)
So I used parent and it solved my second problem as well.
Thanks,
Shahroon
On Thu, Jun 25, 2009 at 1:46 PM,
Is it possible to avoid applying rails default FieldWithErrors css
class for particular input fields.
if not how to avoid on the whole.
Thanks a bunch
--
Posted via http://www.ruby-forum.com/.
--~--~-~--~~~---~--~~
You received this message because you are
Hello All, I wanted to implement sphinx search. I have following models.
Blog # post model has column channel_feature_id has_many :posts,
:foreign_key = channel_feature_id -- Post # Indexes for thinking
sphinx define_index do indexes title indexes abstract indexes body #indexes
comments.body,
On Thu, Jun 25, 2009 at 5:05 AM, Newb
Newbrails-mailing-l...@andreas-s.net wrote:
Is it possible to avoid applying rails default FieldWithErrors css
class for particular input fields.
if not how to avoid on the whole.
You can print the errors individually using your own css:
% if
Hello,
I also have the same problem setting business categories as primary in
my edit_categories page using a radio_button. The radio_button's
behavior changes, all buttons can be selected and can't be de-selected.
Everything works fine on my new page. My codes is also like what Raji
had.
This is JEEVITHA from Progressions.
(About PROGRESSIONS: Progressions, a TOTAL HR Solutions company with
deep domain knowledge spanning recruitment consultancy, placements,
contract staffing, flexi staffing, permanent staffing, corporate
training, competency profiling, performance appraisal
Hello All,
I have been working on dynamically filling the drop box some more and got it to
work -- if I call the model directly from the view (code snippet below %=
select(wsc_uid...)...).
Now, I know this is not correct. I resorted to doing it this way because when
trying to pass
Do you mean how to timeout a session, or clean up old sessions in the
database (when using table-based session, opposed to cookie-based
sessions)?
Cheers,
Nicholas
On Jun 24, 11:22 pm, Xiahong Gao gaox...@gmail.com wrote:
Hi everyone,
I am a newb. Can anyone tell me how to do session
Hello All, PLEASE HELP
I am starting the challenge of developing a business data site for a
customer.
As I heard RoR is so much object oriented and as I did lots of Java
programming in the past, I have started to learn RoR and fell in love
immediately.
I am having this tough dilemma of using RoR
Hi,
We've an application that uses url_for in controllers and views. In
views, url_for generates a relative url (as if :only_path where used).
All is fine there.
However, in controllers, url_for generates a full url, with the host
name. This causes problems when we have a chain of Apache proxy
If I look at a page with a Scriptaculous example like:
http://www.gregphoto.net/sortable/advanced/
And I can view the html/js source of the page -- my question becomes,
how do I implement this, or wire this into, my rails app? -Janna B
--~--~-~--~~~---~--~~
You
We are runnning Rails 2.1/Mongrel/Apache setup and I'm attempting to
configure Rails/Apache to force ssl. I've added the following line in
my httpd-ssl.conf file, under the VirtualHost:
RequestHeader set X_FORWARDED_PROTO 'https'
The redirect does not take place and instead we are seeing the
Actually, I've just seen the following in the Django mailing lists:
http://www.mail-archive.com/django-upda...@googlegroups.com/msg33992.html
Looks like the option to select the last item is deliberate.
On Jun 25, 3:15 pm, delboy derek.mclough...@gmail.com wrote:
Hi,
We've an application
Thanks for your kind answer,
Just to understand in theory - When I use a regular CMS, I can't really
control the pages the way I like, or build my site framework nor my
database, as I am used to when building a regular app.
Is radiant CMS different? Could I create pages independently using my
You are in luck my friend!
Take a look at Radiant (http://radiantcms.org). It gives you the best
of both worlds: a CMS written in Rails that you can extend all you
want with custom functionality.
Jamey
On Thu, Jun 25, 2009 at 9:58 AM, Oran
Topazrails-mailing-l...@andreas-s.net wrote:
It's kind of the other way around...
Radiant *is* a Rails app, and, yes, it stores its pages in the db.
But, you can write extensions, which are kind of like plugins, which
is just like writing a rails app, meaning you have models,
controllers, and views. And you can integrate these extensions
I would like to restrict database calls globally. Specifically, I
have a project mgt program and want to restrict access to projects on
a user basis. Among others, I have a user and project model. I can
place a condition clause on a relationship, but can I place a
condition on the model
Hi,
Have you tried this? http://github.com/bcurren/ssl_requirement/tree/master
On 25 jun, 11:33, Brian Penrose rails-mailing-l...@andreas-s.net
wrote:
We are runnning Rails 2.1/Mongrel/Apache setup and I'm attempting to
configure Rails/Apache to force ssl. I've added the following line in
Thank you,
I have just briefly looked into radiant. Although looks promising, yet i
see that there is no WYSIWYG editor, and seems to yet lack many of the
functionality Joomla contains.
There is a very nice HTML editor called FCKEDITOR which is commonly used
by developpers. Would you know if
in testing my app I just use the validations
validates_presence_of :first_name, :last_name, :email
validates_presence_of :academy, :message = You must select an
Academy
validates_presence_of :role, :message = You must select a role
standard error_messages are fine for most of my fields
So, I finally went and did it based on a lot of your feedback to me with
some questions I had been asking.
I was formerly on Ruby 1.9.1-p129 and Rails 2.3.2. I was having a lot
of issues with trying to get Postgresql and a few other essential items
working on 1.9.1. Therefore, I started over.
On Jun 25, 3:32 pm, JannaB mistressja...@hotmail.com wrote:
If I look at a page with a Scriptaculous example like:
http://www.gregphoto.net/sortable/advanced/
And I can view the html/js source of the page -- my question becomes,
how do I implement this, or wire this into, my rails app?
I'm pretty sure there are Radiant extensions that let you use
fckeditor, tinymce, or wymeditor.
It's true that Joomla is more mature, but as soon as you have to do
any customizing, the beauty of Radiant is that you simply start
writing Rails code. With Joomla, you have to use PHP.
On Thu, Jun
If you're just starting a new Rails app, *do not* start with an old
version. You'll end up tripping over bugs that have already been
fixed, and wasting a lot of time. Also, you'll be missing features
that you need - for instance, installing plugins via Git, which was
added in (I think) the
Actually, doing some more digging, you should first try adding using
the -m switch to antiword - the docs claim that:
antiword.exe -m utf-8 c:\test.doc
should convert the character set correctly. If nothing else, it should
be easy to try out...
--Matt Jones
On Jun 24, 6:07 pm, Nik
2 options I can think of:
#1 - change the message of each to must be selected. It's not perfect,
but the intent of the message is clear.
#2 - define your own validations using errors.add_to_base. See here for
an example:
Can you put rails on a web server before you have written an
application? And how do you do it?
Thank you,
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Ruby
on Rails: Talk group.
To post to this group, send email
Thanks , I just realized that it was not the Model names, but rather
the field names in my User model... you're right that's fine now...
btw , is there any way to get the error messages in a sequence
similar to the textfields sequence... ?
I doubt as it's a hash and so non-ordered , but ...
Trying to update a text field on a page with the value from a drop down
select menu. Having a hard time accessing the value in the menu. Any
help would be great! :-)
--
Posted via http://www.ruby-forum.com/.
--~--~-~--~~~---~--~~
You received this message
On Thu, Jun 25, 2009 at 9:59 AM, Mr. Watsongraphett...@gmail.com wrote:
No, I mean putting it on the web host server. I use dreamhost @
www.codyewatson.com and I wanted to put it on there.
I don't know anything about dreamhost but AFAIK the same answer
still applies:
`sudo gem install
So do I just transfer the files on my web server?
On Jun 25, 12:03 pm, Hassan Schroeder hassan.schroe...@gmail.com
wrote:
On Thu, Jun 25, 2009 at 9:59 AM, Mr. Watsongraphett...@gmail.com wrote:
No, I mean putting it on the web host server. I use dreamhost @
www.codyewatson.comand I wanted
Bill,
I have a collection select that shows a list of users:
%= collection_select(:person, :convert, @nonUsers, :id, :fullName,
{:prompt = Choose...}, :style = width:125px;) %
And a text field:
%= text_field_tag :userName %
When a user is selected I'm trying to pull that user out of a array
On Thu, Jun 25, 2009 at 9:23 AM, Mr. Watsongraphett...@gmail.com wrote:
Can you put rails on a web server before you have written an
application? And how do you do it?
Yes, typically, `sudo gem install rails` would do it :-)
--
Hassan Schroeder
The book is out of date. Seriously out of date, in fact. (built on
Rails 1.2.3) So much has changed since then that I'd recommend getting
almost *anything* more modern.
You should replace the call to require 'acts_as_ferret' to a
config.gem statement, much like the one for mislav-will_paginate
Hi Matt,
On Thu, 2009-06-25 at 18:31 +0200, Matt Young wrote:
Trying to update a text field on a page with the value from a drop down
select menu. Having a hard time accessing the value in the menu. Any
help would be great! :-)
The basics are to put an observe_field on the drop down with a
Chris Hanks wrote:
Yeah, sorry, I meant the model attribute and meant model.
Geez, I am not articulating myself clearly today. I meant the model
attribute and SAID model.
--
Posted via http://www.ruby-forum.com/.
--~--~-~--~~~---~--~~
You received this message
No, I mean putting it on the web host server. I use dreamhost @
www.codyewatson.com and I wanted to put it on there.
On Jun 25, 11:54 am, Hassan Schroeder hassan.schroe...@gmail.com
wrote:
On Thu, Jun 25, 2009 at 9:23 AM, Mr. Watsongraphett...@gmail.com wrote:
Can you put rails on a web
Yeah, sorry, I meant the model attribute and meant model.
I'm not sure how you would arrange the error messages in a specific
order like that, but you can place them alongside each field.
http://guides.rails.info/activerecord_validations_callbacks.html#customizing-the-error-messages-html
For
On Thu, Jun 25, 2009 at 10:10 AM, Mr. Watsongraphett...@gmail.com wrote:
So do I just transfer the files on my web server?
What files? You use `gem` to install rails.
Are you actually talking about *deploying* an application that you've
created somewhere else? Because that's an entirely
Yes, I am talking about deploying it on the web server.
I just want to deploy a barebones application.
rails depot
app/
config/
db/
doc/
lib/
log/
public/
script/
test/
tmp/
vendor/
On Jun 25, 12:28 pm, Hassan Schroeder hassan.schroe...@gmail.com
wrote:
On Thu, Jun 25, 2009 at 10:10 AM, Mr.
Hi Matt,
I haven't used the :function option before. I find it easier just to
write the JS when I want to keep it all in the browser, so take what
follows with a grain of salt.
On Thu, 2009-06-25 at 19:10 +0200, Matt Young wrote:
Bill,
I have a collection select that shows a list of users:
Do you have the source code stored somewhere? like github or your own
subversion? You should have a look at capistrano as a deployer
application for your rails app.
Also what type of webserver/appserver is it that you are using?
Mongrel/Thin other?
Its at http://www.dreamhost.com on a Debian Linux server
On Jun 25, 1:50 pm, heimdull fre...@cfandersen.com wrote:
Do you have the source code stored somewhere? like github or your own
subversion? You should have a look at capistrano as a deployer
application for your rails app.
Also what
yes..
2009/6/25, Nicholas Henry nicholas.he...@gmail.com:
Do you mean how to timeout a session, or clean up old sessions in the
database (when using table-based session, opposed to cookie-based
sessions)?
Cheers,
Nicholas
On Jun 24, 11:22 pm, Xiahong Gao gaox...@gmail.com wrote:
Hi
On Thu, Jun 25, 2009 at 12:05 PM, Mr. Watsongraphett...@gmail.com wrote:
Its at http://www.dreamhost.com on a Debian Linux server
? What is?
The question is: do you have an existing application that you want
to deploy? If so, where is that application's source code?
But as suggested, reading
yes to which one?
On Thu, Jun 25, 2009 at 3:08 PM, gaoxh gaoxh04gaox...@gmail.com wrote:
yes..
2009/6/25, Nicholas Henry nicholas.he...@gmail.com:
Do you mean how to timeout a session, or clean up old sessions in the
database (when using table-based session, opposed to cookie-based
I've got a simple form that uses date_select and I'd love to have it
automatically choose the next open date (bonus points: have it skip
weekends). How would I do this?
Thanks so much!
Dan
--~--~-~--~~~---~--~~
You received this message because you are subscribed
http://api.rubyonrails.org/classes/ActionView/Helpers/DateHelper.html#M001983
see the options list, :default
Gavin
http://handyrailstips.com
On Jun 25, 8:26 pm, dansinker dansin...@gmail.com wrote:
I've got a simple form that uses date_select and I'd love to have it
automatically choose the
Hi, we internally are creating gems out of particular sets of models,
both to share them among multiple Rails apps, but also to use them
within background scripts.
If possible, I'd like for the models to function with ActiveRecord/
ActiveSupport as the only dependencies and not require a full
I would like to use a select box to display and edit a boolean model
attribute. I realize that perhaps checkboxes or radio buttons are a
more idomatic way to do this in html but I would like to use a select
box.
What I want to do is to map the selected value in the box to the
existing value of
Hello,
I've got an interesting problem... I'm running RoR on Windows Server
2003 (using Apache though, not IIS) and I have an app that does a test
to see if the user provided MAPI credentials are valid in MS Exchange.
If the credentials are good, it works fine. However, if I put false
Thanks so much. I wish there was some kind of protection against
creating scaffolds with reserved words. It's frustrating.
Anyway, thank you for the help!
On Jun 25, 4:26 am, Colin Law clan...@googlemail.com wrote:
2009/6/24 John Woods john.wo...@marcottelab.org:
Hi all,
I accidentally
2009/6/25 John Woods john.wo...@marcottelab.org:
I wish there was some kind of protection against
creating scaffolds with reserved words. It's frustrating.
Can anyone point us at a list of reserved words in RoR that we should
not use for models etc? I have fallen over this myself a couple
Yuck, I apologize for the horrible sentences in my reply... it is the
end of the day.
On Jun 25, 4:50 pm, John Yerhot joyer...@gmail.com wrote:
If you're doing form_for something like this will work.
Of course, I'm using a
% form_for(@your_model_here) do |f| %
%= f.error_messages %
p
Matt,
Thank you very much for your valuable advices. I will definitely need
to check out the latest good book on Rails. Which one would you
recommend?
I also have discovered the wonder of plugins. Which plugins would you
recommend for user authentication, file uploads and other common
Anyone ever done HTML validation of an arbitrary piece of HTML within
their RoR app.? Any gems/plugins that would work? Would Hpricot do the
trick?
Thanks,
Wes
--
Posted via http://www.ruby-forum.com/.
--~--~-~--~~~---~--~~
You received this message because
If you're doing form_for something like this will work.
Of course, I'm using a
% form_for(@your_model_here) do |f| %
%= f.error_messages %
p
%= f.label :is_invoicable%br /
%= f.select :is_invoicable, {Yes = true, No = false}%
/p
p
%= f.submit 'Update' %
/p
% end %
Of
sorry for confusion. for databased session
2009/6/25 Nicholas Henry nicholas.he...@gmail.com
yes to which one?
On Thu, Jun 25, 2009 at 3:08 PM, gaoxh gaoxh04gaox...@gmail.com wrote:
yes..
2009/6/25, Nicholas Henry nicholas.he...@gmail.com:
Do you mean how to timeout a session, or
I just want to make sure I'm doing this properly. I have one table that
acts as a primary key:
Table : teams
team_id
name
All of my other tables have the following criteria:
team_id
stats..
more stats..
even more stats..
The foreign key is team_id. So, I'm trying to understand how to
I understand the foreign id has to have the same association id in the
naming.. for instance,..
class PassingOffense
belongs_to :team
end
class ScoringOffense
belongs_to :team
end
class Teams
has_many :passing_offenses
has_many :scoring_offenses
end
Correct? Or, should I be
Here's any example of a rake task that cleans out sessions that are
some many weeks old:
http://topfunky.net/svn/plugins/topfunky_power_tools/tasks/database.rake
You can call the rake task in a cron job, but clearing them out every
five minutes seems a little extreme. I wondering if you are
On Jun 24, 9:18 pm, Matt Jones al2o...@gmail.com wrote:
I think Fred's nailed the solution already, but some more general
advice:
- I'd *highly* recommend you read Programming Ruby (the Pickaxe book),
either online (http://www.rubycentral.com/book/), or purchased from
Pragmatic
Hi
I am very new to rspec and would like to learn more. I have googled
around and asked in irc with no firm answers.
I have the following controller :
class ProductsController ApplicationController
before_filter :loadsidebar
def show
@category =
On Jun 25, 8:22 pm, Älphä Blüë rails-mailing-l...@andreas-s.net
wrote:
I just want to make sure I'm doing this properly. I have one table that
acts as a primary key:
No. Tables do not act as primary keys. Fields act as primary keys
for tables.
Table : teams
team_id
name
ActiveRecord
On Jun 25, 8:48 pm, Älphä Blüë rails-mailing-l...@andreas-s.net
wrote:
I understand the foreign id has to have the same association id in the
naming..
By default, yes. If the foreign key field has a different name, you
can specify that.
for instance,..
class PassingOffense
belongs_to
On Jun 25, 5:47 pm, Wes Gamble rails-mailing-l...@andreas-s.net
wrote:
Anyone ever done HTML validation of an arbitrary piece of HTML within
their RoR app.? Any gems/plugins that would work? Would Hpricot do the
trick?
Are you perchance looking for something like
Or if you are using MySQL 5.1 as a backend for your session you have
the ability to schedule a task that can delete the sessions that are
5min or older.
On Jun 25, 5:53 pm, Nicholas Henry nicholas.he...@gmail.com wrote:
Here's any example of a rake task that cleans out sessions that are
some
The Rails Guides are at the following address:
http://guides.rails.info/
They look really good. I am particularly interested in learning how to
create the nice looking pop-up menu when you click on the Guides Index
link.
Does anyone know where can I find information on how to do create such
Thanks Marnen,
So basically:
Teams has
id
name
Other tables have
team_id
stats
more_stats
still_more_stats
.. then the model is singular
class Team
has_many :passing_offenses
has_many :scoring_offenses
end
and the other tables use team_id as the foreign key association..
class
Is there a way to determine if a timestamp is between 2 times of the
day? For example, I need to know if a time is between 12:00 am and 4:00
am. The field I'm looking at has a full timestamp (i.e. 2009-06-25
19:58:37) The date is irrelevant, I just need to know if the time of day
was in range.
--
Here's my old crack at it. Probably newer code bases that do a better job.
http://github.com/kete/validates_as_sanitized_html/tree/master
Cheers,
Walter
On Fri, Jun 26, 2009 at 2:33 PM, Marnen Laibow-Koser mar...@marnen.orgwrote:
On Jun 25, 5:47 pm, Wes Gamble
If you're using a shared hosting account, all the necessary infrastructure
should already be in place for you. See the wiki for information about
deployment.
http://wiki.dreamhost.com/Rails
http://wiki.dreamhost.com/Passenger
If you're running a VPS, it's not clear what's installed out of the
BTW, assert_valid_markup looks to be aimed at functional tests and is about
the HTML being standards compliant.
On Fri, Jun 26, 2009 at 4:43 PM, Walter McGinnis
walter.mcgin...@gmail.comwrote:
Here's my old crack at it. Probably newer code bases that do a better job.
I am currently working on an app in which I a list of tasks displayed
under a particular project. These tasks get displayed when the
application first loads. I am setting this project as the current
project. I have a method in my application controller which sets the
last project created by the
I am currently working on an app in which I a list of tasks displayed
under a particular project. These tasks get displayed when the
application first loads. I am setting this project as the current
project. I have a method in my application controller which sets the
last project created by the
Here is how I have done it.
In routes:
map.namespace(:admin) do |admin|
admin.resources :users, :member={:edit_password=:get,
:update_password=:post }
admin.resources :suppliers
admin.resources :categories
end
Now just use admin in the
2009/6/26 Älphä Blüë rails-mailing-l...@andreas-s.net:
...
Then I just need to define my queries. I'm better when I see them so
I'll try some of your examples in the console and see how the output
works.
You might well find it worth while looking through some of the guides
at
91 matches
Mail list logo