Hi
I have in my user model
attr_accessor :no_password_validation_needed
with_options :unless = :no_password_validation_needed do |p|
p.validates_length_of :password, :minimum = 6
p.validates_confirmation_of :password
end
And from controller I do
$ irb
module$block.item[/\$([^.]*)\./,1]
= block
--
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
it's not going to work on Ubuntu if you have installed Ruby Gems from
repositories.
ja...@jacek-desktop:~$ sudo gem update --system
[sudo] password for jacek:
ERROR: While executing gem ... (RuntimeError)
gem update --system is disabled on Debian. RubyGems can be updated
using the official
Thanks for your quick answers.
Michel:
6.7 is the latest version on Ubuntu repository, it comes with apt-get
Colin:
You are right.
Both:
Tried that. It seams I didn't do it where I should, because in
terminal I get
sudo: gem: command not found
Can I do it from Netbeans?
--
You received this
First of all, Let me list my configurations:
FreeBSD 8.0
Ruby 1.9.1p376
Rails 2.3.5
rubyzip 0.9.4 installed in /usr/local/lib/ruby19/gems/1.9/gems/
rubyzip-0.9.4
I have placed the following line inside Rails::Initializer.run block
cconfig.gem 'rubyzip', :lib = 'zip/zip'
However, I
Hey thanks for the help but i think i solved my problem now, I
downloaded the latest xcode and made sure i restarted the computer
before reinstalling everything, now says its in /usr/local/bin/ruby
where the the tutorial says it should be.
On Mar 23, 8:25 pm, Peter peterorp...@me.com wrote:
Hi
Peter peterorp...@... writes:
Hi i'm a beginner to ruby on rails and I am trying to start a tutorial
http://hivelogic.com/articles/compiling-ruby-rubygems-and-rails-on-snow-leopard
but still can't get it in the local folder. ANy help would be very
grateful.
Regards Peter
Peter
is
On Mar 24, 6:09 am, Tom Mac li...@ruby-forum.com wrote:
But now when
@user.no_password_validation_needed = 2 #or any other value
Now I get unexpected result as validation not happens That is
same result when true? Why this?What modification should I make?Please
help
That's
There is a typo in initilizer. Also require 'rubygems` in your code before
requiring zip/zip
2010/3/24 Jay janus...@gmail.com
First of all, Let me list my configurations:
FreeBSD 8.0
Ruby 1.9.1p376
Rails 2.3.5
rubyzip 0.9.4 installed in /usr/local/lib/ruby19/gems/1.9/gems/
Does this help?
irb
puts show if true
show
puts show if false
= nil
puts show if nil
= nil
puts show if 2
show
puts show if DateTime.new
show
In ruby it'll be true unless it receives nil or false.
Kind Regards
Luke
--
Posted via http://www.ruby-forum.com/.
--
You received this
Tony Augustine wrote:
hi i wanted to upload a file using file uploader. alsoi wanted to
add those contacts in those excel file to contact list how i can
do this in rails.pls help
To upload look at the paperclip plugin:
http://github.com/thoughtbot/paperclip
Excel is a bit more
On 24 March 2010 08:07, Frederick Cheung frederick.che...@gmail.com wrote:
That's how truth values work in ruby - anything other than nil or
false is generally considered true.
Have a look at the Ruby Facets library for their kernel.true? method:
Dmitry posted pretty much the same solution as I did, but a slightly
different regular expression. On Ruby 1.8.7 (your Ruby version may vary) my
regex is *slightly* faster. On Ruby 1.9.1 his is *slightly* faster. The
difference is 0.3s over 10,000,000 iterations, so either way it's pretty
Luke Pearce wrote:
Tony Augustine wrote:
hi i wanted to upload a file using file uploader. alsoi wanted to
add those contacts in those excel file to contact list how i can
do this in rails.pls help
To upload look at the paperclip plugin:
http://github.com/thoughtbot/paperclip
On 24 March 2010 07:31, Bigos ruby.obj...@googlemail.com wrote:
it's not going to work on Ubuntu if you have installed Ruby Gems from
repositories.
I think it is generally considered better not to install from the
repositories. I used the technique from
A came to ruby from perl and as I know my solution faster there.
Ofcourse in this case it doesn't matter. But understating how works
your
and mine solutions may be useful...
I've seen your massage and post mine only for educational reasons.
Plus mine look's nicer, I just kidding:)
PS I don't know
On 24 March 2010 09:22, DmitryPush dmitryp...@gmail.com wrote:
A came to ruby from perl and as I know my solution faster there.
Ofcourse in this case it doesn't matter. But understating how works
your and mine solutions may be useful...
Absolutely
I've seen your massage and post mine only
On Tue, Mar 23, 2010 at 5:09 PM, Peter peterorp...@me.com wrote:
Hey thanks for the help but i think i solved my problem now, I
downloaded the latest xcode and made sure i restarted the computer
before reinstalling everything, now says its in /usr/local/bin/ruby
where the the tutorial says it
In my command line I type script/server and I get the following error
below:
/usr/local/lib/ruby/site_ruby/1.8/rubygems.rb:826:in
`report_activate_error': RubyGem version error: rack(0.9.1 not ~ 1.0.1)
(Gem::LoadError)
from /usr/local/lib/ruby/site_ruby/1.8/rubygems.rb:260:in `activate'
from
On 24/03/2010 10:34 AM, Zayd Connor wrote:
In my command line I type script/server and I get the following error
below:
/usr/local/lib/ruby/site_ruby/1.8/rubygems.rb:826:in
`report_activate_error': RubyGem version error: rack(0.9.1 not ~ 1.0.1)
(Gem::LoadError)
I see the rubygem version
Hi,
I have to use Hawaii's time zone which is UTC-10 for my created_at.
Can anyone tell me how can I solve this problem?
Thanks,
Tushar
--
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
On 24 March 2010 10:39, Tushar Gandhi li...@ruby-forum.com wrote:
Hi,
I have to use Hawaii's time zone which is UTC-10 for my created_at.
Can anyone tell me how can I solve this problem?
Times should generally always be stored in UTC, then there is no
confusion about the time. Display it in
I added the entries to the test/fixtures/node_groups.yml file and that
seems to have worked - thanks. For some reason I thought I could link
the nodes through the test/fixtures/nodes.yml file.
As for the relationship, the Node can have one or more children but only
one parent. The idea is that
I guess is something dealing with this:
attr_accessor :name
isn't it?
On 15 Mar, 14:16, adedip ade...@gmail.com wrote:
Hi guys..I did try almost everything..but still cant' get any result..
Starting from a simple scaffold creating a class called reference
I have updated the controller with
then I've updated the routes.rb file with this line (do I have to
replace the already in map.resources :references or do i add this
second new line?):
--
map.resources :references, :collection = {load = get}
--
You have to replace the line.
--
Posted via http://www.ruby-forum.com/.
--
You
On 24 March 2010 10:51, David Ishmael li...@ruby-forum.com wrote:
I added the entries to the test/fixtures/node_groups.yml file and that
seems to have worked - thanks. For some reason I thought I could link
the nodes through the test/fixtures/nodes.yml file.
As for the relationship, the Node
To clarify...
Node is a self-referential object. Here is the class for the Node
object.
class Node ActiveRecord::Base
belongs_to :category
belongs_to :status
has_one :parents,
:class_name = NodeGroup,
:foreign_key = child_id
has_one :parent, :through = :parents
You might need to use a parser like fastercsv to get values out of your csv.
David
On Mar 24, 2010 5:16 PM, Tony Augustine li...@ruby-forum.com wrote:
Luke Pearce wrote: Tony Augustine wrote: hi i wanted to upload a file
using file uploader
actuallly i think u ddnt get ma requirement
You have snipped everything again so that it will make it difficult
for people to follow the thread.
On 24 March 2010 11:25, David Ishmael li...@ruby-forum.com wrote:
To clarify...
Node is a self-referential object. Here is the class for the Node
object.
class Node ActiveRecord::Base
Hi there,
I'm trying to install passenger on a hosted server which has
Ubuntu 9.04
Ruby 1.8.6
Rails 2.3.5
Apache 2
I had some trouble with gem install passenger, but went through after
installing build-essential which were not on the machine.
First when I launched
On Wed, Mar 24, 2010 at 9:08 AM, Christophe Decaux
christophe.dec...@gmail.com wrote:
Hi there,
I'm trying to install passenger on a hosted server which has
Ubuntu 9.04
Ruby 1.8.6
Rails 2.3.5
Apache 2
I had some trouble with gem install passenger, but went through after
installing
Thanks Leonardo,
I installed everything with gem
Anyone else ?
Le 24 mars 2010 à 13:13, Leonardo Mateo a écrit :
On Wed, Mar 24, 2010 at 9:08 AM, Christophe Decaux
christophe.dec...@gmail.com wrote:
Hi there,
I'm trying to install passenger on a hosted server which has
Ubuntu 9.04
Ruby
I am trying to make a GET request to the below listed url which should
return an XML. When I put the compete url in my browser, I get the
intended XML.
http://axml.travelnow.com/external/xmlinterface.jsp?cid=1resType=airintfc=wsxml=AirSessionRequest
That worked perfectly, thanks!
--
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 from this group, send email to
There error I get is:
HTTPVersionNotSupported# 505
On Mar 24, 8:48 am, tashfeen.ekram tashfeen.ek...@gmail.com wrote:
I am trying to make a GET request to the below listed url which should
return an XML. When I put the compete url in my browser, I get the
intended XML.
Again, thanks Colin this is great for ROR but I tried Netbeans.
On Mar 24, 11:20 am, Colin Law clan...@googlemail.com wrote:
On 24 March 2010 07:31, Bigos ruby.obj...@googlemail.com wrote:
it's not going to work on Ubuntu if you have installed Ruby Gems from
repositories.
I think it is
Hey, not my intent to hijack the thread, but what's better about Netbeans on
*nix system compaired to gvim or other advanced editor?
--
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
On 24 March 2010 12:48, David Ishmael li...@ruby-forum.com wrote:
That worked perfectly, thanks!
What did? It is not clear which email you are responding to as you
have snipped it all.
You might save some time by looking at acts_as_tree or probably even
better awsome_nested_set.
Colin
--
I modified the Node class using the code you provided, updated the model
in the database, and then tested with success. To be clear, I am
referring to your code below.
belongs_to: parent, :class_name = Node, :foreign_key = parent_id
has_many: children, :class_name = Node
Everything appears to
try to install 'ruby-devel', in ubuntu it 'gem install ruby-devel' I
guess
Is it helps?
On Mar 24, 3:17 pm, Christophe Decaux christophe.dec...@gmail.com
wrote:
Thanks Leonardo,
I installed everything with gem
Anyone else ?
Le 24 mars 2010 à 13:13, Leonardo Mateo a écrit :
On Wed, Mar 24,
Hey all
I got myself into a bit of a corner. I unpacked hpricot 0.8.2 into my
vendor/gems folder then realised that i needed to unpack 0.8.1 instead.
No problem, i thought, i'll just delete that folder out of gems, change
the config.gem specification in environment.rb, and do it again. But
now
I installed Passenger successfully . After installing I have added below
three lines in apache2.conf.
LoadModule passenger_module
/usr/lib/ruby/gems/1.8/gems/passenger-2.2.11/ext/apache2/mod_passenger.so
PassengerRoot /usr/lib/ruby/gems/1.8/gems/passenger-2.2.11
PassengerRuby /usr/bin/ruby1.8
Ken, you need to add the following to your Gemfile:
gem authlogic, :git = git://github.com/binarylogic/authlogic.git
Then you'll invoke the following command:
$ bundle install
Good luck,
-Conrad
Thanks conrad,
The following is what I am getting - do I need a configuration for
Hello,
Does anyone know the reason for the vulnerability in Twitter when a
lot of DOS attacks were made?
Were they due to the design of the application or the server where
they hosted got attacked?
Thanks,
Pratik
--
You received this message because you are subscribed to the Google Groups Ruby
On Wed, Mar 24, 2010 at 2:20 PM, Ken Foust li...@ruby-forum.com wrote:
Thanks conrad,
The following is what I am getting - do I need a configuration for git
Fetching git://github.com/binarylogic/authlogic.git
sh: git: command not found
An error has occurred in git. Cannot complete bundling.
Hi,
All any kind of help is appreciated. and thanks a lot.
I have to apply sphinx search on my project.
My development environment is windows, My SQL, Ruby Rails but the
project is deployed on Ubuntu.
Q1 ) Can I use sphinx. Will it be a problem if the development is on
windows and deployment is
Hi Friends,
Plz send profiles matching the requirement to mur...@javaji.com
Role : *Sybase IQ Developer*
Location : *Tampa FL*
Duration : *6m
*Client : *Banking*
*Sybase IQ Developer needed with 5-7 yrs exp.*
Thanks and Regards,
Murali
571 483 2829
Javaji Systems Solutions Inc.,
Hi Friends,
Plz send profiles matching the requirement to mur...@javaji.com
Title : *SharePoint Developer*
Location : *Los Angeles CA*
Duration : *6m
*Client : *Banking
will prefer local candidates*
**
Thanks and Regards,
Murali
571 483 2829
Javaji Systems Solutions Inc.,
www.javaji.com
--
I managed to solve this by uninstalling version 0.8.2 of the hpricot
gem. Which has confused me even more ... does my gems folder know
what's going on in my rails app??? buh?
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google
Hi Friends,
Plz send profiles matching the requirement to mur...@javaji.com
Title : *UAT Coordinator*
Location : *NJ
*Duration :* 6m*
Client :* Banking*
*UAT testing/ project coordination skills.*
Thanks and Regards,
Murali
571 483 2829
Javaji Systems Solutions Inc.,
www.javaji.com
Gintautas: I don't know. I want to find out!
On Mar 24, 3:10 pm, Gintautas Šimkus dihita...@gmail.com wrote:
Hey, not my intent to hijack the thread, but what's better about Netbeans on
*nix system compaired to gvim or other advanced editor?
--
You received this message because you are
I think I only use 10% of features of gvim and still it gets the job done :)
That's why I am asking :) what benefits Aptana or Eclipse give over gvim? :)
2010/3/24 Viorel viorelvl...@gmail.com
Gintautas: I don't know. I want to find out!
On Mar 24, 3:10 pm, Gintautas Šimkus
I am trying to add a functionality similar to adding an attachment to
an email in Gmail.
I have a form to create object1. One field is to add a book
reference. When you click the link add book a popup opens with the
book form. Clicking the add button closes the popup and puts the
title of the
Fidel Viegas wrote:
On Wed, Mar 24, 2010 at 2:20 PM, Ken Foust li...@ruby-forum.com wrote:
Thanks conrad,
The following is what I am getting - do I need a configuration for git
Fetching git://github.com/binarylogic/authlogic.git
sh: git: command not found
An error has occurred in git.
On 24 March 2010 14:56, Gintautas Šimkus dihita...@gmail.com wrote:
I think I only use 10% of features of gvim and still it gets the job done :)
That's why I am asking :) what benefits Aptana or Eclipse give over gvim? :)
Depends what you like, but the conversation's been had before:
On Mar 24, 2010, at 10:48 AM, Max Williams wrote:
I managed to solve this by uninstalling version 0.8.2 of the hpricot
gem. Which has confused me even more ... does my gems folder know
what's going on in my rails app??? buh?
No, but rubygems knows that you want the highest available version
Julian Leviston wrote:
Yes, you should store simply an array of ID's, not the entire objects.
An ID (integer) is about 4 bytes or so from memory, so it won't be
terribly much information...
--
Learn: http://sensei.zenunit.com/
Last updated
Rob Biedenharn wrote:
You might have been requiring it somewhere earlier than Rails
processed the config.gem that limited (specified) the version that you
wanted.
ah - in one of the other frozen gems or plugins you mean? I did a
search of my application and the only reference i could find
Hi Rob - my first statement in that last post was actually a lie - haml
(which i have in my plugins) requires hpricot, that must be the source
of the first problem. I'd still like to know why it's complaining about
me needing to build the gem though.
--
Posted via http://www.ruby-forum.com/.
Hello,
I have a beta testing program for a multilingual webapp using globalite.
People register on the website in english or in french.
I use a UserObserver from acts_as_authenticated plugin that send an
email with an activation code to validate registration.
Depending on which language... I
Thanks guys, I found the problem. There was another factor that made
look the rand not correct. Everything's just fine now :)
--
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
Gary Doades wrote:
On 24/03/2010 10:34 AM, Zayd Connor wrote:
Up and running!! Thanks Gary
Kindest Regards
Zayd
Yes, but it's the rack version it is complaining about, not rails.
gem install rack -v=1.0.1
Cheers,
Gary.
--
Posted via http://www.ruby-forum.com/.
--
You received
hi,
im using acts_as_tree and im not sure on how to group find-result.
x = find.almost_all
p
% for y in @x.ancestors.reverse %
%= link_to h(y.title), page % gt;
% end %
/p
gives me a nice breadcrum. but how is it possible to group the list lets
say by the 1level or second level?
thx
--
Thanks for replying, Gintautas.
The typo was not in the environment.rb.
I did try to add require 'rubygems' before require 'zip/zip' but it
still doesn't work.
nor require 'composite_primary_keys' works.
It seems the gems installed is not recognized at all. :' (
On Mar 24, 4:12 pm, Gintautas
Furthermore, I have tried to add
ENV['GEM_PATH'] = '/usr/local/lib/ruby19/gems/1.9'
at the beginning of the environment.rb but still failed.
--
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
Hi,
I have a problem with login to my application.
I use nginx as load-balancer and mongrel cluster as application
servers. I have 2 servers and 8 mongrels per server.
When I try to login directly on mongrel, everything is ok. But if I
use to login nginx, login sometimes failed - login and
for example I have the following simple code in my views:
%= link_to Here, :controller = 'home', :action = 'inside_here' %
I get the actual view in the page looking like this:
Here (/home/inside_here)
where the underlying url is showing right beside the Here word. By
default, the Here word
Conrad Taylor wrote:
On Fri, Feb 19, 2010 at 1:08 AM, RaW ra...@wrzochol.net wrote:
I think
$ script/generate
has been replaced with
$ r g
in Rails3
Am I right?
You'll need to do the following in Rails 3:
rails g model user_session
Then just edit the file and you should be good
for example I have the following simple code in my views:
%= link_to Here, :controller = 'home', :action = 'inside_here' %
I get the actual view in the page looking like this:
Here (/home/inside_here)
where the underlying url is showing right beside the Here word. By
default, the Here word
re: where is it read from?: I use passenger to serve my rails apps
these days (all running on *nix), and per the passenger docs:
http://www.modrails.com/documentation/Users%20guide.html#_passengertempdir_lt_directory_gt
...
5.10. PassengerTempDir directory
Specifies the directory that Phusion
I have an hash of display names and their corresponding object
attribute names called @columns.
As I iterate through @columns, what is the syntax for accessing the
attribute of the object using c? I get an error on the 4th line.
% for c in @columns[object_+...@object.categorie] do %
Hi Friends,
Plz send profiles matching the requirement to mur...@javaji.com
Title :* UAT Coordinator*
Location : *NJ
*Duration :* 6m
*Client : *Banking
UAT testing/ project coordination skills*
Thanks and Regards,
Murali
571 483 2829
Javaji Systems Solutions Inc.,
www.javaji.com
--
You
Hi Friends,
Plz send profiles matching the requirement to mur...@javaji.com
Role : *Sybase IQ Developer*
Location: *Tampa FL*
Duration: *6m
*Client: *Banking*
*Sybase IQ Developer needed with 5-7 yrs exp*
Thanks and Regards,
Murali
571 483 2829
Javaji
can anybody tell me what is going wrong from the information taken
from the development log below. WHen i start WEBrick and try and view
a page on the localhost i get the following error, We're sorry, but
something went wrong.We've been notified about this issue and we'll
take a look at it
On Mar 24, 2010, at 7:40 AM, tispratik wrote:
Hello,
Does anyone know the reason for the vulnerability in Twitter when a
lot of DOS attacks were made?
Were they due to the design of the application or the server where
they hosted got attacked?
It was a widely publicized distributed denial
Hey all,
in building an application that will require multiple ajax calls
occuring concurently to different database tables in order to display
data in a form, and then require user input to modify data and then
update it to the database, which invokes a multi-step transaction, that
is, making
I have LabGroup and LabDesc which have many through LabDescGroup. I'd
like to identify LabDescs which don't have a LabGroup. This works:
x = []
LabDescGroup.find( :all, :select = 'DISTINCT lab_desc_id' ).each{ |c|
x c.lab_desc_id }
y = []
LabDesc.find( :all, :select = 'id' ).each{ |c| y c.id
On Wed, Mar 24, 2010 at 10:31 AM, ES emsto...@gmail.com wrote:
I have an hash of display names and their corresponding object
attribute names called @columns.
As I iterate through @columns, what is the syntax for accessing the
attribute of the object using c? I get an error on the 4th line.
hi, im currently utilizing searchlogic.
now they want me to add a searchagent, meaning u can save your criterias
and get notified whenever something suitable hits the database. am i correct
that all i need to do is to store the searchlogic-params in a userfield and
run a daily job to execute the
Sent from my iPhone
On Mar 24, 2010, at 10:06 AM, Ken Foust li...@ruby-forum.com wrote:
Conrad Taylor wrote:
On Fri, Feb 19, 2010 at 1:08 AM, RaW ra...@wrzochol.net wrote:
I think
$ script/generate
has been replaced with
$ r g
in Rails3
Am I right?
You'll need to do the following in
In case anyone else cares... looks like this is a bug and doesn't work
quite right.
https://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/2553-actionviewtemplatehandlerserberb_trim_mode-broken#ticket-2553-13
On Mar 22, 8:40 pm, cult hero binarypala...@gmail.com wrote:
Hey, I'm
Hi
I am trying to submit an asp form using Mechanize.
I have to parse this site in order to get the results
http://www.vitranexpress.com/home/CombinedHome.aspx
So for this I have to log in the site which I was successful using
Mechanize. Once you logged in you have to select the Link Rate
I'm doing a series of ruby on rails tutorials and it got to a part
where i need to edit the following files that should be automatically
inside the public folder: dispatch.cgi,dispatch.fcgi,dispatch.rb but I
have none of these inside my public folder. Is there a reason for
this? And how can i
You were right, Bigos. It doesn't work. Apt-get updates rubygems for
ruby, not jruby from Netbeans. Anyway, I resoved the problem by
installing 6.8 from Netbeans. Thank you all!
Gintautas: Just curiosity: Did you ever tried Netbeans?
Michael: English is not my native language. What is YMMY?
--
I'm doing a series of ruby on rails tutorials and it got to a part
where i need to edit the following files that should be automatically
inside the public folder: dispatch.cgi,dispatch.fcgi,dispatch.rb but I
have none of these inside my public folder. Is there a reason for
this? And how can i
dont worry about this, i just stopped trying to have a version of ruby
in my local folder and everything seems to work fine now
On Mar 24, 5:40 pm, Peter peterorp...@me.com wrote:
can anybody tell me what is going wrong from the information taken
from the development log below. WHen i start
Am I correct in thinking that one cannot use attr_accessor in
ActiveRecord models?
I have success when using either cattr_accessor or mattr_accessor but
not the native Ruby method. Am I missing something here, or is this
how it really is?
Thanks. Elliott G
--
You received this message because
Check out
http://www.anchor.com.au/hosting/dedicated/Running-Rails-2.3-Using-CGI-with-Rackunder
The Meat.
/Lasse
2010/3/24 Peter peterorp...@me.com
I'm doing a series of ruby on rails tutorials and it got to a part
where i need to edit the following files that should be automatically
inside
Or you could use mod_rails http://www.modrails.com/ (Passenger) instead.
/Lasse
2010/3/24 Lasse Bunk lasseb...@gmail.com
Check out
http://www.anchor.com.au/hosting/dedicated/Running-Rails-2.3-Using-CGI-with-Rackunder
The Meat.
/Lasse
2010/3/24 Peter peterorp...@me.com
I'm doing a
You _can_ use attr_accessor in ActiveRecord models. Like this:
class Article ActiveRecord::Base
attr_accessor :my_prop
end
Maybe you could post some code and/or error message.
/Lasse
2010/3/24 elliottg x...@simplecircle.net
Am I correct in thinking that one cannot use attr_accessor
thank you, so they aren't meant to be there nowadays, I originally thought i
had done something wrong, i can move on now, cheers
On 24 Mar 2010, at 20:25, Lasse Bunk wrote:
Or you could use mod_rails (Passenger) instead.
/Lasse
2010/3/24 Lasse Bunk lasseb...@gmail.com
Check out
Maybe you're not requesting it properly, making sure that you call the
format.json part? It seems it redirects to requests_url in format.html.
/Lasse
2010/3/23 Kad Kerforn li...@ruby-forum.com
in my controller the create action is :
respond_to do |format|
if @request.save
Just to clarify: A proper json request is to call /path.json or call /path
(with or without .json) with an Accept: application/json header.
/Lasse
2010/3/24 Lasse Bunk lasseb...@gmail.com
Maybe you're not requesting it properly, making sure that you call the
format.json part? It seems it
Glad you found out :)
/Lasse
2010/3/24 Peter Simmons peterorp...@me.com
thank you, so they aren't meant to be there nowadays, I originally thought
i had done something wrong, i can move on now, cheers
On 24 Mar 2010, at 20:25, Lasse Bunk wrote:
Or you could use mod_rails
On Mar 23, 4:58 pm, brianp brian.o.pea...@gmail.com wrote:
Hey everyone.
I'm a one person team and in the next month need to produce and deploy
an application. I've been playing with rails for a little over a year
now and recently deployed my first app as a private contract.
I'm now
Hi Lasse.
I think I may be able to get to the point a bit better with 2 more
questions...
Am I correct in thinking that attr_accessor always returns or sets an
instance variable?
Another reason I'm confused, is that, when I set an attr_accessor :foo
in my model and then drop into script/console
Thats because mattr_accessor is at module level, cattr_accessor is at class
level, and attr_accessor is at instance level. So you have to use
class.instance_methods to find your method – like this:
class_name.instance_methods.grep(/method_name/)
/Lasse
2010/3/24 elliottg
this is my current code:
#notice {
border: solid 1px #99cc99;
background-color: #e2f9e3;
color: #006600;
padding: 5px;
margin-bottom: 5px;
}
#notice.error {
border-color: #e2f9e3;
background-color: #ee;
color: #cc;
}
% flash.each do |key, msg| %
%= content_tag :div, flash[:error] ||
This should do it:
LabDesc.find(:all, :conditions = 'NOT EXISTS(SELECT * FROM
lab_desc_groups WHERE lab_desc_id=lab_descs.id)')
/Lasse
2010/3/24 Dudebot craign...@gmail.com
I have LabGroup and LabDesc which have many through LabDescGroup. I'd
like to identify LabDescs which don't have a
That clearly explains some of the issues I was having.
Thanks a ton!
EG
On Mar 24, 5:36 pm, Lasse Bunk lasseb...@gmail.com wrote:
Thats because mattr_accessor is at module level, cattr_accessor is at class
level, and attr_accessor is at instance level. So you have to use
1 - 100 of 142 matches
Mail list logo