Displaying 20 results from an estimated 20 matches for "al2o".
Did you mean:
al2
2009 Jun 29
3
Table Inheritance based on a function
Hello,
we have a problem in a CMS project that we believe is basic for RoR
developement and could concern others as well - or have already:
RoR implements the ''Single Table Inheritance'' (STI) Pattern:
http://www.martinfowler.com/eaaCatalog/singleTableInheritance.html
.. through its ''ActiveRecord'' ORM.
The Fowler example mentions a ''type''
2010 May 14
4
Tricky model situatione
I have two models Club and users. users are regular authenticated
users and some of them might create a club. A club can also have
members (essentially users) and there are attributes and models that
apply to member but not to users.
Here is what I have right now.
Club => belongs_to :user
User => has_many clubs (since a user can host multiple clubs).
Now how do I fit this member model
2009 Mar 17
3
Disabel "pluralize_table_names" in Rails 2.3.2
What is it in Rails 2.3.2?
ActiveRecord::Base.pluralize_table_names = false
--
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-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe
2009 Aug 10
2
A copy of ApplicationController has been removed from the module tree but is still active!
Yes, more dependencies.rb fun!
As far as I''m able to ascertain, these errors started appearing after
upgrading from Rails 2.3.1 to 2.3.2 and persist in 2.3.3.
They''re highly nonderministic and appear rather sporadically, which
makes it extremely frustrating. Multiple developers on our team have
experienced this problem across varying versions of Ruby/Rails.
They''re
2010 Aug 27
2
Recording a Live Earning Cast call
Hi all,
I am working on a project, in this I am assigned a task, this task
consist of recording a live earning cast call when administrator press
single button for that event.
The Earning cast call are basically conference calls which happen at
the company premises.
How can I implement this recording functionality in ROR,
Please help me
Thanks,
Shri
--
You received this message because you
2011 Jan 15
3
has_many :through with Single Table inheritance
I have the following model structure setup.
class User < ActiveRecord::Base
end
class Parent < User
has_many :relationships
has_many :children,
:class_name => "Student",
:through => :relationships,
:conditions => "related_as = ''parent''"
end
class Student < User
has_many :relationships
2010 Feb 22
4
"the change you want was rejected. Maybe you changed something you didn't have access to.""
Anyone ever get an error message such as this?
"the change you want was rejected. Maybe you changed something you
didn''t have access to.""
I haven''t been able to see this in testing, but I''m getting reports
out on the field from a few users trying to register to one of my
websites.
-S
--
You received this message because you are subscribed to the
2009 Dec 17
2
RFC: conflict_warnings plugin
Greetings,
I was hoping to get some feedback on a plugin I wrote.
The plugin is called conflict_warnings and is currently available from
my github repository at http://github.com/EmFi/conflict_warnings
The purpose of the plugin is to provide a simple methods of preventing
data inconsistencies that could arise from multiple users interacting
with the same resource.
Under basic operation a
2010 Jan 09
3
tinyint(1) and boolean
So i had a boolean attribute in my model which gets interpreted to
tinyint(1) in mysql by rails migrations. Now tinyint(1) accepts a
range in mysql and i want to change my boolean attribute to an
attribute which can accept 3 values(0,1,2).
I made the change to the view and when i post the form selecting the
selecting the value ''2'', it still gets saved as a ''0''.
2012 Jun 08
6
Play! 2.0 (Scala) or RubyOnRail (Ruby)?
Hi ruby community,
It has been months after much experimenting RubyOnRail but it wasn''t
chosen for my Enterprise
project. Recently, I heard some of my friends argue that RubyOnRail is
Enterprise-class framework
which perform much better than PHP. IMHO, I think Play! 2.0 (Scala)
can offer more than just a
framework and high-performance.
What are your thought on these comparison?
--
You
2009 Aug 15
4
Isn't there any performance issue when saving serialized attributes every time?
In edge rails, serialized attributes are saved every time no matter
they are changed or not:
def update_with_dirty
if partial_updates?
# Serialized attributes should always be written in case
they''ve been
# changed in place.
update_without_dirty(changed | (attributes.keys &
self.class.serialized_attributes.keys))
else
2009 Nov 03
2
Problem with gem install and rails update
Hi everyone.
I''m new to Rails and have been trying to learn something listening to
Ryan Bates'' podcast.
I have tried to install the authlogic gem, inserting the extension as
a dependency in the environment.rb file as requested.
But, when I run ''sudo rake gems:install'' I get an error: wrong number
of arguments.
I''ve pasted the trace blow.
Then
2009 Jun 17
12
FasterCVS and Rails
Hello all,
I''m trying to import some csv data (that has latin characters) using
faster csv but I keep getting a MalformedCSVError:
"Unclosed quoted field on line 1."
"/ruby/lib/ruby/gems/1.8/gems/fastercsv-1.2.3/lib/faster_csv.rb:1592:in
`shift''"
I''ve tested the same code outside of the Rails application an it works
fine.
Can anyone help me?
Here is
2012 Jan 11
4
ActiveRecord: ar-each_model
Hi,
today I went into a problem, when I had to iterate over a big result
set. ActiveRecord produces a huge array of model instances, which
consumed 1GB of memory on my machine. A comparable perl DBI script
only used some KB for iterating over the result set.
Then I was suggested to use batch (#find_each) for the problem. But
basically batch does the same thing by splitting the query into
several
2009 Apr 21
11
can we decrypt the cipher encrypted using Digest::SHA1.hexdigest
what i have done is as follows
password = Digest::SHA1.hexdigest("#{salt}:#{password}")
pass1 = Digest::SHA1.hexdigest("#{salt}:asdfgh")
pass2 = Digest::SHA1.hexdigest("#{salt}:asdfgh")
pass3 = Digest::SHA1.hexdigest("#{salt}:qwerty")
puts pass1==pass2
puts pass1==pass3
This works fine
but i need to get the decrypted password
how can i get it
any help is
2009 Nov 01
9
Dynamic Database Connections
Hey everyone! I have a problem that''s been making me a little nuts.
I would like to use RoR for a upcoming project, but if I can''t get
past this hiccup I''m
afraid I''ll have to use PHP or Java. Ugh.
The application needs to have a database-per-customer model. So when
I do a Product.find(:all) I need to make sure i''m connecting to say
acme.products
2012 Sep 18
4
multiple modules defining same method included into a class
In Ruby, classes are never closed: you can always add methods to an
existing class. This applies to the classes you write as well as the
standard, built-in classes. All you have to do is open up a class
definition for an existing class, and the new contents you specify
will be added to whatever''s there. In the same regard, if module is
used with the name of a pre-existing module that
2010 May 12
16
In development mode not all types are included in the query related to type
class User
end
class Agent < User
end
script/console production
User.find_by_name ''john''
SELECT "people".* FROM "people" WHERE ((("people"."type" = ''User'' OR
"people"."type" = ''Manager'') OR "people"."type" = ''Agent'')) AND
2009 Dec 01
12
Rails 2.3.5 - Cannot install plugin
I''m always get the message "Plugin not found: ["git://github.com/
aaronchi/jrails.git"]" when trying to install a rails plugin, even for
SVN or GIT. After google search, some people suggest that replace
"git://" with "http://" and add "/" at the end of the url. I tried and
it still does not work.
I used the ruby 1.9.1-p243 and rails
2010 Jan 03
24
SQLServer on Rails
Does any one know how to setup SQLserver with ruby1.9. It was working
on an earlier version and now nothing works! I have installed the
gems dbi ,dbd-odbc and activerecord-odbc-adapter and can connect in
straight Ruby. However, using rails with database.yml nothing works!
I hosed everything and reinstalled rails and now, I get Win32/Parite
virus on ruby.exe. Any ideas? I''m losing