On 7 December 2010 01:06, Rob Th li...@ruby-forum.com wrote:
Thanks pepe,
RobsMacAir:~ rob$ rails -v
Rails 2.3.8
RobsMacAir:~ rob$ gem uninstall my_gem -v=2.3.8
ERROR: While executing gem ... (Gem::InstallError)
Unknown gem my_gem = 2.3.8
You have to put the name of the gem you want
I have one dought...I want use list box..when clicked the list value it
automaticaly set in the textbox.how to write coding for this
--
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
Curious about the best direction or design pattern to use here -
looking for opinions.
I have a store with products diced into categories. Should I create a
polymorphic model 'Product' and have individual models for the product
types? Reason is - the products differ quite a bit in
Hi everyone,
I just realized that on my shared web hosting, RoR is supported. What to
expect from this in terms of developing a simple HTML5 web page to
advanced portal that includes forum board and mailing list? How do I
begin.
I have a shell access to this hosting, but not as root.
P/S: I'm
On Dec 7, 7:13 am, Koteswara rao Vuyyuru li...@ruby-forum.com wrote:
I have a website in Ruby on Rails which is now supposed to be Integrated
with Drupal where the main contents of the page will be served from
Drupal, header and footer will be in ROR. Wanted to know if there is any
API
I think you are doing in a wrong way. Drupal is a complete CMS
and not worth being called from ROR.
If it is the other way round, ie, Calling RoR from Drupal will be
not only useful, will make the website more maintainable.
All you need to do is make RoR webservices, then make some
drupal
Dear Folks,
I am Web developer and have experience mainly with the Django Web
framework for Python and wish to learn ROR.
I am currently using Rails 3.0.3 and was getting a routing error
whenever I added a view to a controller until I found out I had to add
the path to the routes.rb file under
Use javascript to achieve your goal.
I have used jQuery library.
$(function() {
$(#list_box_id).live(change, function() {
var e = $(this);
var selectedValue = e.val();
e.hide();
$(#input_field).show().find(input).val(selectedValue);
depends on your requirement use collection or member in your route.
thanks
abhis
On Tue, Dec 7, 2010 at 3:27 PM, Nandakumar Chandrasekhar
li...@ruby-forum.com wrote:
Dear Folks,
I am Web developer and have experience mainly with the Django Web
framework for Python and wish to learn ROR.
My first suggestion is to try org-mode if you haven't already. If you
have already looked at it, but haven't given it a try, then now is the
time! Org-mode offers a lot of functionality, but you can easily learn
it a little bit at a time.
There are also a good list of tips here:
Hi
My environment is
ruby 1.8.6
rails 2.2.2
mysql 5.1
windowsXP
I have a very lengthy controller action which fetch mail from pop
server.
But some times I get error. Mainly three error. And I have to restart
the application again to remove this errors. But after some time the
On 7 December 2010 05:28, Koteswara rao Vuyyuru li...@ruby-forum.com wrote:
Please do not top post, it makes it difficult to follow the thread.
Insert your reply into the previous post. Thanks.
Dear Marnen and Colin
I already said,
-- I am creating one site using Ruby on Rails Framework.
On 7 December 2010 07:11, Julien julien.ap...@gmail.com wrote:
Well i guess the conclusion of all this is that if you encounter
unwanted spaces in your partials, check your editor :)
It would be interesting to inspect the file with a hex editor to see
exactly what the non-printing chars are.
On 7 December 2010 09:57, Nandakumar Chandrasekhar li...@ruby-forum.com wrote:
Dear Folks,
I am Web developer and have experience mainly with the Django Web
framework for Python and wish to learn ROR.
I am currently using Rails 3.0.3 and was getting a routing error
whenever I added a view
Thanks, Colin. I live in literalville.
I tried as I think you suggested and got this.
Select gem to uninstall:
1. rails-2.3.8
2. rails-2.3.8
3. All versions
3
Remove executables:
rails
in addition to the gem? [Yn]
Removing rails
Successfully uninstalled rails-2.3.8
Remove executables:
Julien wrote in post #966777:
[...]
My gut tells me it's not an matter of line endings since the strange
digit appears at the very beggining of the inclusion of the partial
(or the yield). I don't know much about file system but i suppose
Komodo was created on Linux and uses some file headers
Hi,
I have a Model named User.
It has two columns firstname, lastname.
There a record with id=1, firstname=srikanth and lastname=Jeeva
While Using search:
keyword = Srikanth Jeeva
And I write a Query:
User.find(:all, :conditions=[firstname like ? or lastname like ?,
'%keyword%',
Srikanth Jeeva wrote in post #966858:
[...]
User.find(:all, :conditions=[firstname like ? or lastname like ?,
'%keyword%', '%keyword%'])
Ofcourse this will give 0 result, as firstname is srikanth and i'm
searching for Srikanth Jeeva
How can i write query for firstname and lastname, so that
On 7 December 2010 13:25, Rob Th li...@ruby-forum.com wrote:
Thanks, Colin. I live in literalville.
I tried as I think you suggested and got this.
Select gem to uninstall:
1. rails-2.3.8
2. rails-2.3.8
3. All versions
3
Remove executables:
rails
in addition to the gem? [Yn]
On 7 December 2010 13:38, Marnen Laibow-Koser li...@ruby-forum.com wrote:
Julien wrote in post #966777:
[...]
My gut tells me it's not an matter of line endings since the strange
digit appears at the very beggining of the inclusion of the partial
(or the yield). I don't know much about file
On 7 December 2010 13:38, Srikanth Jeeva li...@ruby-forum.com wrote:
Hi,
I have a Model named User.
It has two columns firstname, lastname.
There a record with id=1, firstname=srikanth and lastname=Jeeva
While Using search:
keyword = Srikanth Jeeva
And I write a Query:
Colin Law wrote in post #966863:
On 7 December 2010 13:38, Marnen Laibow-Koser li...@ruby-forum.com
wrote:
making silly speculations. Komodo does no such thing AFAIK.
What *might* be going on is that your file is being saved as UTF-8 with
a byte order mark (BOM) at the beginning. That
Colin Law wrote in post #966865:
On 7 December 2010 13:38, Srikanth Jeeva li...@ruby-forum.com wrote:
keyword = Srikanth Jeeva
record.
Split the keyword into parts and use the two parts separately in the
query. Have a look at the split method of ruby String class.
Quite right. I
No, 2.3.5, 2.2.2 and 1.2.6 are still installed as noted above
Whoops. Yeah I bought two books on RoR and google like crazy to find
help and information. The tutorials online assume one is pretty much up
to speed kind of like a cooking show half way in (what white sauce we
just made?) The books
keyword = Srikanth Jeeva
record.
Split the keyword into parts and use the two parts separately in the
query. Have a look at the split method of ruby String class.
Thanks for response.
After splitting i write query like this,
keyword = Srikanth Jeeva
splitted_word = keyword.split( )
Rob Th wrote in post #966868:
[...]
The books deal with programming fairly well but not the
config stuff - especially Mac.
Then you're reading the wrong books. Most Rails developers work on Mac
OS.
I would just feel 100% more confident going into getting this app
running if I knew the
Srikanth Jeeva wrote in post #966869:
keyword = Srikanth Jeeva
record.
Split the keyword into parts and use the two parts separately in the
query. Have a look at the split method of ruby String class.
Thanks for response.
After splitting i write query like this,
keyword = Srikanth Jeeva
RobsMacAir:~ rob$ gem uninstall my_gem -v=2.3.8
ERROR: While executing gem ... (Gem::InstallError)
Unknown gem my_gem = 2.3.8
Sorry, I forgot to tell the group to e-mail me updates on the post.
I'm sorry, Colin is right, what I wrote was just an example.
I expected after deinstalling
Typically I do rake db:migrate VERSION=0
But that also gave me the same error about Primary key is not allowed in a
has_and_belongs_to_many join table
So I then fired up dbconsole and manually dropped the table.
But now I even if I run rake db:migrate the join table isn't created -
On Dec 6, 2010, at 11:47 PM, Rick R wrote:
I'm curious on the best practice to remedy this situation...
I created a habtm migration but forgot the :id = false
I ran the migration (rake db:migrate)
I tried to run my tests and then go the error that made me realize I
forgot the :id = false.
--
Marnen Laibow-Koser
http://www.marnen.org
mar...@marnen.org
Sent from my iPhone
You are not helpful. Please stop.
--
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,
pepe,
Removing gems is a little boring but it shouldn't take you more than
10 or 15 minutes to remove all the ones you need to remove once you
get the hang of it.
How, I tried the
RobsiMac:~ rob$ sudo gem uninstall rails -v 2.3.8
Select gem to uninstall:
1. rails-2.3.8
2. rails-2.3.8
3. All
Hi,
I try to get a ruby on rails environment in cygwin running.
We use jruby(1.5.3), rvm, rails3 and several gems.
I installed rvm in cygwin and installed the desired jruby version via
rvm.
It worked. But when I now install gems they are not installed in the
appropriated folder. And a `gem list`
Rob Th wrote in post #966879:
--
Marnen Laibow-Koser
http://www.marnen.org
mar...@marnen.org
Sent from my iPhone
You are not helpful. Please stop.
You know, I had decided I wasn't going to post further answers here, but
then it seemed like you actually had started listening to what
Rob Th wrote in post #966881:
pepe,
Removing gems is a little boring but it shouldn't take you more than
10 or 15 minutes to remove all the ones you need to remove once you
get the hang of it.
How, I tried the
RobsiMac:~ rob$ sudo gem uninstall rails -v 2.3.8
Select gem to uninstall:
Rob Th wrote in post #966852:
I expected after deinstalling rails 2.3.8 gem list local would find the
other rails versions. But did this blow away all rails?
I admit I am in learning mode. I thought this was a place to help out
beginners. I have been programming in Assembler, C, and tons of
How, I tried the
RobsiMac:~ rob$ sudo gem uninstall rails -v 2.3.8
Select gem to uninstall:
1. rails-2.3.8
2. rails-2.3.8
3. All versions 3
Remove executables:
rails
in addition to the gem? [Yn]
Removing rails
Successfully uninstalled rails-2.3.8
Remove executables:
rails
Srikanth Jeeva wrote in post #966869:
User.find(:all, :conditions=[firstname like ? or lastname like ? or
firstname like ? or lastname like ?, '%splitted_word[0]%',
'%splitted_word[0]%', '%splitted_word[1]%', '%splitted_word[1]%'])
Is there any better way of doing this?
Another option,
On Dec 6, 2010, at 6:50 PM, David Kahn wrote:
You are mistaken, and although I came late to the Paperclip party, I
can't recall a time when it was true. You can edit the model without
modifying the image (just don't upload another image) and everything
stays the same in the image, or you
Robert Walker wrote in post #966886:
Rob Th wrote in post #966852:
I expected after deinstalling rails 2.3.8 gem list local would find the
other rails versions. But did this blow away all rails?
I admit I am in learning mode. I thought this was a place to help out
beginners. I have been
pepe wrote in post #966887:
Pepe, Thanks.
If you have problems or more questions I think it might be helpful if
you post the list of gems you have now to give us a better idea about
what mismatches you could have.
RobsiMac:~ rob$ gem list --local
*** LOCAL GEMS ***
actionmailer (2.3.8,
Rob Th wrote in post #966894:
[...]
I tried rvm and I just don't get it. Sorry.
What don't you get? Perhaps if you were to say what trouble you're
having, we could help. But don't just give up on it.
I think you are right. I think Xcode installed some of this.
Correct. Ruby and Rails
Abhishek shukla wrote in post #964036:
hey Vineeth,
As mentioned by others about understand the concept of partial first
thats
true.
But the collection object can be accessable by the name of partial in
you
case you can access using %= form.attribute_name %
%= render :partial =
On 7 December 2010 14:04, Srikanth Jeeva li...@ruby-forum.com wrote:
keyword = Srikanth Jeeva
record.
Split the keyword into parts and use the two parts separately in the
query. Have a look at the split method of ruby String class.
Thanks for response.
After splitting i write query like
On Dec 7, 2010, at 10:25 AM, Rob Th wrote:
Can you explain why after doing a de-install of 2.3.8, ruby -v says no
ruby? See above.
Try which ruby in Terminal to see if you don't in fact have a Ruby
binary in your path. Then try locate ruby to find one. Correct your
path as necessary, and
On 7 December 2010 14:32, Rob Th li...@ruby-forum.com wrote:
pepe,
Removing gems is a little boring but it shouldn't take you more than
10 or 15 minutes to remove all the ones you need to remove once you
get the hang of it.
How, I tried the
RobsiMac:~ rob$ sudo gem uninstall rails -v 2.3.8
On 7 December 2010 15:47, Colin Law clan...@googlemail.com wrote:
On 7 December 2010 14:32, Rob Th li...@ruby-forum.com wrote:
pepe,
Removing gems is a little boring but it shouldn't take you more than
10 or 15 minutes to remove all the ones you need to remove once you
get the hang of it.
Colin Law wrote in post #966901:
I don't know how this all works on a mac though
That makes two of us. At least two of us that know what we don't know.
Installing xcode is not an issue. It is easy.
I pondered that question:
1. rails-2.3.8
2. rails-2.3.8
3. All versions
3
Remove
Gudleik Rasch wrote in post #966781:
I have some custom helper classes under lib/ that need to access the
routes (link_to/url_for/etc):
http://gist.github.com/520529
But when I call %= magic_link Product.first %
NEVER DO THAT! Product.first does a database call. Therefore, it
should
Never, this is the one and only rails app ever. I do want to get 1.8.7
on this machine and rails 2.2.2 to match the source machine.
I would actually like to eventually find a programmer to convert it off
rails.
If you are thinking about getting a programmer anyway maybe it might
be wiser if
Walter Davis wrote in post #966900:
On Dec 7, 2010, at 10:25 AM, Rob Th wrote:
Can you explain why after doing a de-install of 2.3.8, ruby -v says no
ruby? See above.
Try which ruby in Terminal to see if you don't in fact have a Ruby
binary in your path. Then try locate ruby to find one.
Umarzuki Bin Mochlis Moktar wrote in post #966803:
Hi everyone,
I just realized that on my shared web hosting, RoR is supported. What to
expect from this in terms of developing a simple HTML5 web page to
advanced portal that includes forum board and mailing list? How do I
begin.
By reading
On Dec 7, 2010, at 11:20 AM, Rob Th wrote:
I think if you re-image this machine
What is re-image?
Use the OS install disks to wipe the machine blank and re-install your
target OS. Given that the Ruby libraries are part of the core OS, not
just Xcode, this may be your only way forward
On 7 December 2010 16:41, Walter Lee Davis wa...@wdstudio.com wrote:
On Dec 7, 2010, at 11:20 AM, Rob Th wrote:
I think if you re-image this machine
What is re-image?
Use the OS install disks to wipe the machine blank and re-install your
target OS. Given that the Ruby libraries are part
Hi,
I'm using MySQL for development and Oracle for testing and production. I
need to create a database view with migrations and this feature is not
available through migration DSL, so, to create the view, I'll need to put
raw SQL code in migration.
What is the best way to do this, keeping the
Gustavo de Sá Carvalho Honorato gustavohonorato wrote in post
#966922:
Hi,
I'm using MySQL for development and Oracle for testing and production. I
need to create a database view with migrations and this feature is not
available through migration DSL, so, to create the view, I'll need to
pepe wrote in post #966915:
Never, this is the one and only rails app ever. I do want to get 1.8.7
on this machine and rails 2.2.2 to match the source machine.
I would actually like to eventually find a programmer to convert it off
rails.
If you are thinking about getting a programmer
Walter Davis wrote in post #966917:
On Dec 7, 2010, at 11:20 AM, Rob Th wrote:
I think if you re-image this machine
What is re-image?
Use the OS install disks to wipe the machine blank and re-install your
target OS.
Walter
Ouch, this Mac has a lot more than ruby and rails on it. Cannot
On Tue, Dec 7, 2010 at 11:54 AM, Rob Th li...@ruby-forum.com wrote:
I cannot fine documentation as to where on a Mac the rails stuff goes.
It doesn't matter. You can leave everything where it is and alter
your environment variables to use another version of ruby/rails
installed where ever you
I'm following a book and I just created a project. I'm in the project
directory (on Windows 7) and in cmd line I typed:(as per instructions)
ruby script/server Webrick
I get the following error:
ruby: no such file or directory --script/server (LoadError)
Can someone please explain what I'm
On 7 December 2010 17:51, Rob Th li...@ruby-forum.com wrote:
See how complicated this question got. I asked how can I get rid of all
the other versions and simplify my environment and I got more complexity
of rvm.
Correct me if I am wrong but your fundamental problem is that somehow
the rails
Thanks Marnen,
I didn't know this plugin. I've read the documentation, but in his example I
can't see how to change the columns names of the view. Is it possible?
Thanks again,
Gustavo
On Tue, Dec 7, 2010 at 3:44 PM, Marnen Laibow-Koser li...@ruby-forum.comwrote:
Gustavo de Sá Carvalho
Hi,
have you created the Rails project using 'rails projectname' command?
Regards,
Gustavo
On Tue, Dec 7, 2010 at 4:06 PM, Tara Keane li...@ruby-forum.com wrote:
I'm following a book and I just created a project. I'm in the project
directory (on Windows 7) and in cmd line I typed:(as per
hi
which version of rails you you are using!
--
Thanks,
Irfan Ahmed Rizvi (Sagar)
cell Numbers:
+880 1676 246 991
+880 1723 712 888
http://www.welltreat.us
http://restaurant.welltreat.us/
http://isp.welltreat.us/
--
You received this message because you are subscribed to the Google
I downloaded the latest version of rails but I don't know how to check
that...
I did create a project already. Then I went into the main folder and
tried to run the server from there but no luck...
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are
Hi,
How would I use assert select to test for the occurrence of the string
'DUS' in a 'p' tag about half way down my view?
I tried:
def test_should_display_airport_names_in_show
get :show, :id = flights(:dus_muc).id
assert_select 'p', 'DUS'
end
but Rails is just finding the first 'p' tag
type rails -v in console to check its version.
For Rails 3 (latest version) try this command: rails server
On Tue, Dec 7, 2010 at 11:47 PM, Tara Keane li...@ruby-forum.com wrote:
I downloaded the latest version of rails but I don't know how to check
that...
I did create a project already.
On Tue, Dec 7, 2010 at 10:06 AM, Colin Law clan...@googlemail.com wrote:
Correct me if I am wrong but your fundamental problem is that somehow
the rails environment is messed up. Your proposed solution is to
delete it all and start again. No-one seems to know how to do this,
though you do
Please quote when replying.
Gustavo de Sá Carvalho Honorato gustavohonorato wrote in post
#966932:
Thanks Marnen,
I didn't know this plugin. I've read the documentation, but in his
example I
can't see how to change the columns names of the view. Is it possible?
I don't know. I've never
Hi Randy,
Hard to say for sure without knowing the specific needs/requirements/
demands of your app, but... if your app is a typical biz or ecomm app
backed by an rdbms where most of the usage (for end users and for
analysis) of the app is spent doing reads vs writes, when it comes to
the
it's Rails 3.0.3 and that instruction worked.
Thanks a million - back to the books...
--
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
I'm about to embark on a project and am seeking advice on my approach.
I have an automotive site that needs to have shared categories. I've
checked out different nested set, ancestral, acts_as_tree, acyclic
plugins but feel they don't exactly fit.
So I am about to roll my own simple solution.
Randy Clark wrote in post #966805:
Curious about the best direction or design pattern to use here -
looking for opinions.
I have a store with products diced into categories. Should I create a
polymorphic model 'Product' and have individual models for the product
types? Reason is - the
Please quote when replying.
Tara Keane wrote in post #966943:
it's Rails 3.0.3 and that instruction worked.
Thanks a million - back to the books...
Not back to the books you've been using. Don't try to learn Rails 3
from a Rails 2 book. A lot changed in version 3. Try
Hello. I have problem.
I can't install rails 3(on windows)
If I put gem install rails it install 2.2.3 version.
If I put gem update rails it update 2.2.3 to 2.2.3 version.
ruby -v: 1.9.2
What I must do to install rails 3?
--
Posted via http://www.ruby-forum.com/.
--
You received this
Randy Clark wrote in post #966944:
I'm about to embark on a project and am seeking advice on my approach.
I have an automotive site that needs to have shared categories. I've
checked out different nested set, ancestral, acts_as_tree, acyclic
plugins but feel they don't exactly fit.
As I said
On Mon, Dec 6, 2010 at 1:36 PM, Marnen Laibow-Koser
li...@ruby-forum.com wrote:
Oh, that's too bad. I had the impression (though I've never used it)
that the Glassfish gem in particular was amazing.
A correction: the GF gem is no longer being developed by Oracle,
but at least one fork is:
On Dec 7, 2010, at 1:52 PM, Misha Ognev wrote:
Hello. I have problem.
I can't install rails 3(on windows)
If I put gem install rails it install 2.2.3 version.
If I put gem update rails it update 2.2.3 to 2.2.3 version.
ruby -v: 1.9.2
What I must do to install rails 3?
Could you type
gem
Hassan Schroeder wrote in post #966940:
On Tue, Dec 7, 2010 at 10:06 AM, Colin Law clan...@googlemail.com
wrote:
Correct me if I am wrong but your fundamental problem is that somehow
the rails environment is messed up. Your proposed solution is to
delete it all and start again. No-one seems
On Tue, Dec 7, 2010 at 11:07 AM, Rob Th li...@ruby-forum.com wrote:
I thought uninstalling rails 2.3.8 would uninstall that version then a
different version would be current.
It would have if you'd answered no :-)
Looks like several versions of rails are still hanging around!
But...
sudo
Sorry for the late answer ... I had to simplyfy my model somehow to
really test that is not an other interaction that causes that problem.
That seems very strange. Are you absolutely sure that this what is happening?
valid? cannot be fetching the object from the db as it must exist
before you
I find that I'm frequently writing code that could be described in
english as If there is an incumbent ActiveRecord that meets some
specific criteria, then update one or more of its fields. Otherwise
create a new record with the same criteria and new field values.
ActiveRecord's dynamic finder
Hassan Schroeder wrote in post #966954:
On Tue, Dec 7, 2010 at 11:07 AM, Rob Th li...@ruby-forum.com wrote:
I thought uninstalling rails 2.3.8 would uninstall that version then a
different version would be current.
It would have if you'd answered no :-)
Looks like several versions of rails
I find that I'm frequently writing code that could be described in
English as If there is an incumbent ActiveRecord that meets some
specific criteria, then update one or more of its fields. Otherwise
create a new record with the same criteria and new field values.
ActiveRecord's dynamic finder
On 7 December 2010 15:37, Colin Law clan...@googlemail.com wrote:
On 7 December 2010 14:04, Srikanth Jeeva li...@ruby-forum.com wrote:
keyword = Srikanth Jeeva
Thanks for response.
After splitting i write query like this,
Don't forget to include checks to make sure you have two words and
Correct I would like to support multiple parents per a given
category. For instance:
Automotive
Trailers
Cargo Trailer
Marine/boating
Misc.
Cargo Trailer
'Cargo Trailers' may be accessed through different hierarchies.
I have considered using a graph but through the implementation may be
Even odder.
sudo gem uninstall rails -v 2.3.5
ERROR: While executing gem ... (Gem::InstallError)
cannot uninstall, check `gem list -d rails`
RobsiMac:~ rob$ sudo gem install rails -v 2.3.5
Successfully installed rails-2.3.5
1 gem installed
Installing ri documentation for rails-2.3.5...
Fearless Fool wrote in post #966959:
I find that I'm frequently writing code that could be described in
English as If there is an incumbent ActiveRecord that meets some
specific criteria, then update one or more of its fields. Otherwise
create a new record with the same criteria and new field
Walter, please see attached.
Michael
Attachments:
http://www.ruby-forum.com/attachment/5526/nnm.gif
--
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
Rob Th wrote in post #966961:
Even odder.
sudo gem uninstall rails -v 2.3.5
ERROR: While executing gem ... (Gem::InstallError)
cannot uninstall, check `gem list -d rails`
RobsiMac:~ rob$ sudo gem install rails -v 2.3.5
Successfully installed rails-2.3.5
1 gem installed
Installing ri
On Dec 7, 2010, at 11:34 AM, Fearless Fool wrote:
I find that I'm frequently writing code that could be described in
English as If there is an incumbent ActiveRecord that meets some
specific criteria, then update one or more of its fields. Otherwise
create a new record with the same
On Tue, Dec 7, 2010 at 11:39 AM, Rob Th li...@ruby-forum.com wrote:
RobsiMac:~ rob$ sudo gem install rails -v 2.3.5
Successfully installed rails-2.3.5
1 gem installed
RobsiMac:~ rob$ sudo gem uninstall rails -v 2.3.5
Successfully uninstalled rails-2.3.5
RobsiMac:~ rob$ rails -v
Rails 2.3.5
Please quote when replying.
Randy Clark wrote in post #966962:
Correct I would like to support multiple parents per a given
category. For instance:
Automotive
Trailers
Cargo Trailer
Marine/boating
Misc.
Cargo Trailer
'Cargo Trailers' may be accessed through different hierarchies.
BTW, the best I've come with so far is:
file: ar_extensions.rb
=
class ActiveRecord::Base
def self.create_or_update(attrs_to_match, attrs_to_update = {})
if (incumbent = self.first(:conditions = attrs_to_match))
incumbent.update_attributes(attrs_to_update)
I'm not sure it's the editor; my own issues are coming with Notepad+
+. Still, I'm glad I checked back into this thread. It's given me
some stuff to try out. If I find the magic solution (or if I don't)
I'll check back in.
--
You received this message because you are subscribed to the Google
Hassan Schroeder wrote in post #966968:
On Tue, Dec 7, 2010 at 11:39 AM, Rob Th li...@ruby-forum.com wrote:
RobsiMac:~ rob$ sudo gem install rails -v 2.3.5
Successfully installed rails-2.3.5
1 gem installed
RobsiMac:~ rob$ sudo gem uninstall rails -v 2.3.5
Successfully uninstalled
Thanks Marnen -
Er, why? Why does a cargo trailer belong in a boating category?
I have the impression, here as in your earlier post, that your category
hierarchy may be in need of some normalization.
I may need to rethink the data structure, but as of now the site calls
for categories to be
Randy Clark wrote in post #966977:
Thanks Marnen -
Er, why? Why does a cargo trailer belong in a boating category?
I have the impression, here as in your earlier post, that your category
hierarchy may be in need of some normalization.
I may need to rethink the data structure, but as of now
On Tue, Dec 7, 2010 at 4:29 PM, Marnen Laibow-Koser
li...@ruby-forum.com wrote:
Please quote when replying.
Gustavo de Sá Carvalho Honorato gustavohonorato wrote in post
#966932:
Thanks Marnen,
I didn't know this plugin. I've read the documentation, but in his
example I
can't see how to
On Tue, Dec 7, 2010 at 12:05 PM, Rob Th li...@ruby-forum.com wrote:
RobsiMac:~ rob$ sudo gem uninstall rails
Select gem to uninstall:
1. rails-2.2.2
2. rails-2.2.2
3. All versions
Ouch.
So select 3 and keep going :-)
You can always add back the version you want later.
--
Hassan
1 - 100 of 163 matches
Mail list logo