On Sun, Jan 31, 2010 at 1:12 PM, Manish Belsare li...@ruby-forum.comwrote:
hey i m getting an error wen i do da paginating stuff..can u help meh?
n it says ActionController does not contain 'super' method.. bt books
say its valid..y?
Error:
uninitialized constant
also are you using http://amazon.rubyforge.org/ ?
the examples that it presents look similar to yours.
On Sun, Jan 31, 2010 at 5:07 PM, Curtis Schofield
curtis.schofi...@gmail.com wrote:
Verify it the file is ok first by writing to the filesystem.
You may need to attempt to isolate the
Hi,
I have two apps, one in Rails, and one in Merb. Both use cookie based
session store, and are in the same domain. I set the session key and
secret to be exactly the same in both apps, but they don't seem to get
the session data of each other.
When I try to print the cookies in each of them, I
Hi,
My name is Sebastian von Conrad and I'm not a recruiter; I'm a
software developer with e-channel search, an industry leading search
engine marketing agency with offices in Adelaide and Sydney. We've
been in business for over 10 years and was recently named as one of
Deloitte Technology Fast
On Jan 31, 9:51 pm, NY yan@gmail.com wrote:
Hi,
I have two apps, one in Rails, and one in Merb. Both use cookie based
session store, and are in the same domain. I set the session key and
secret to be exactly the same in both apps, but they don't seem to get
the session data of each
Dear Everyone,
I have 1 opensource project im very interested in. I would like to
install this project as a plugin since it does not support a /theme
folder to override the app views, js, stylesheets, etc.
And this option won't be available since it has no priority for them.
Im to new to ruby to
On Jan 31, 4:48 pm, Ryan Abbott abbot...@gmail.com wrote:
I have a script that is running as a runner script, its job is to find
reports that have recently been published and send emails to the users
notifying them of the reports. The reports are available online, but
are also available via
Naveen Dhanuka wrote:
Hi,
I found it difficult to work according to this book with the latest
RoR release.
Please guide as to which RoR release to use.
Thanks...
Best Wishes,
Naveen Dhanuka.
Rails 2.2.2 should work ok.
--
Posted via http://www.ruby-forum.com/.
--
You received
Hi,
I am new for RoR i am using
f.select for dropdown and want to populate it from database table
i have a function in cities model which retrieve all cities and i am
doing the follwoing to populate the dropdown
f.select :city_id , @cities
but it display a strange output with some # etc
how i will
Hi,
i want to select only product id and product name from a table how
will i manage please help
--
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
M I R wrote:
Hi,
I am new for RoR i am using
f.select for dropdown and want to populate it from database table
i have a function in cities model which retrieve all cities and i am
doing the follwoing to populate the dropdown
f.select :city_id , @cities
but it display a strange output with
M I R wrote:
Hi,
i want to select only product id and product name from a table how
will i manage please help
Use
find_by_sql(SQL statement)
or use
find_by_product_id_and_product_name...
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to
did you try
10.chr
--
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
I am new to rails and developed a simple task in an app that runs
every while using crontab. Under previous versions of rails it worked
fine. But, I have upgraded the server, installed rails 2.3.5 as per
rubygems latest and it now breaks the task.
When I run the task I get this error:
Hello all!
Here is the gist with my problem:
http://gist.github.com/291533
I need to get all records with one query. Is it possible? 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
On Feb 1, 8:50 am, Gigg gra...@mrit.co.za wrote:
I am new to rails and developed a simple task in an app that runs
every while using crontab. Under previous versions of rails it worked
fine. But, I have upgraded the server, installed rails 2.3.5 as per
rubygems latest and it now breaks the
Ralph Shnelvar wrote:
I'm missing something basic ...
How does one install jQuery in RoR?
Use the following line in your layout
*
%= javascript_include_tag jquery 1.2.3.4 %
*
Use
find_by_sql(SQL statement)
You can also pass :select option to your find e.g.:
Product.find :all, :select=id, name
Regards,
Rimantas
--
http://rimantas.com/
--
You received this message because you are subscribed to the Google Groups Ruby
on Rails: Talk group.
To post to this group,
Alex Shkolnikov wrote:
Hello all!
Here is the gist with my problem:
http://gist.github.com/291533
I need to get all records with one query. Is it possible? Thanks
you need to provide little more info. Are they separate models/entities
( individual tables) or an STI - single table
Hi
Could anyone please suggest a good Payroll cum HR management open
source rails application?
Thanks
Tom
--
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
Hi Champs, I hope this is not a newbie question.:)
I have an leave table with columns start_date and end_date. Employees
can apply leave for any date. Now i want to display the number of days
of leave he had taken in a year.. I want it to be displayed like this:-
Jan - 1
Feb - 10
Mar - 11
..
Sns Sem wrote:
Ruby on Rails or RoR, is an open source web application framework for
the Ruby programming language.
We build quality Ruby On Rails web applications for start-ups and
established businesses since early 2006. We focus on the core idea,
perfect the interface, suggest innovative
Hi All
I had been using Rails 2.1.2 and in routes.rb i had a route defined
like
map.namespace :mysite do |mysite|
mysite.questions '/questions.:format', :controller =
'mysite_questions', :action = 'index'
end
And now I have updated my rails version
Now I get an error like this.
Rails
they are individual tables, not sti
On Feb 1, 12:43 pm, Rails List li...@ruby-forum.com wrote:
Alex Shkolnikov wrote:
Hello all!
Here is the gist with my problem:
http://gist.github.com/291533
I need to get all records with one query. Is it possible? Thanks
you need to provide little
Charanya Nagarajan wrote:
Hi All
I had been using Rails 2.1.2 and in routes.rb i had a route defined
like
map.namespace :mysite do |mysite|
mysite.questions '/questions.:format', :controller =
'mysite_questions', :action = 'index'
end
And now I have updated my rails version
Ray K. wrote:
There are the bddcasts: www.bddcasts.com
They do cost money, but they're worth it, so is the rspec book.
A word of advice:
Learning RoR at the same time with Cucumber and RSpec will require you
to fight a very steep learning curve.
Very often you will neither know how to
On Feb 1, 8:55 am, Alex Shkolnikov alex.shkolni...@gmail.com wrote:
Hello all!
Here is the gist with my problem:http://gist.github.com/291533
I need to get all records with one query. Is it possible? Thanks
I wrote up some examples for the syntax for :include / :joins a little
while ago:
Hi,
Anybody knows how to put multiple edit fields into active scaffold?
I'mean exactly 2 edit fields where first update 1'st column and second
one 2'nd column ??
Regards
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups
Been working a bit lately on implementing Rails app. templates and
generators. It is clear there is a lot of overlap and that features
from generators could be used in app. templates and vice versa.
I will try to port some of the generator features such as the template
function (executing an .erb
Thanks a lot!
On Feb 1, 1:47 pm, Frederick Cheung frederick.che...@gmail.com
wrote:
On Feb 1, 8:55 am, Alex Shkolnikov alex.shkolni...@gmail.com wrote:
Hello all!
Here is the gist with my problem:http://gist.github.com/291533
I need to get all records with one query. Is it possible?
Thanks For the help Kannan.
But I realised that,I get this error,only when I use this type of route
mysite.search_questions '/questions/search.:format/:q', :controller =
'mysite_questions', :action = 'search'
This works perfectly fine in the previous old version of rails not with
the newer
Alright, thanks to all of you. I'll give it a shot.
--
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
its ok for now, but when i go to edit page how will i populate the
dropdown while the selected option will be the one coming from
database
suppose i have 3 cities
ID City
1. London
2. Bristol
3. Cambridge
when i was adding record i select Bristol with id 2 now when i go to
You could also use Rails Engines. This is a feature of Rails 2.3+
which enables mounting of several apps in one Rails application
configuration. Ryanb did a screencast on it.
Rails 3 also support mounting multiple apps in the Rack.
An other idea is to port your models/database to Mongo DB
Kristian wrote:
You could also use Rails Engines. This is a feature of Rails 2.3+
which enables mounting of several apps in one Rails application
configuration.
Oh, yeah. I always forget about Engines.
Ryanb did a screencast on it.
Rails 3 also support mounting multiple apps in the Rack.
pepe wrote:
I am sorry but I don't have an answer about the RAM question. However
I would like to answer Marnen�s comment. While I agree that letting
the DB do the work for mass record processing should be the best and
most efficient way to go by reading the OP one cannot assume that is
the
Michael Schuerig wrote:
On Sunday 31 January 2010, Marnen Laibow-Koser wrote:
If you only include specific helper modules, you can have multiple
methods with the same name, but different implementations. This can
be useful in order to avoid inadvertently stepping on another
method with
pepe wrote:
Sorry, one more thing. What could be the best sources of information
to learn how to use both tools? I learn much better with examples.
I have searched for the RSpec book, which for what I've read has both
subjects in it, but it seems it's not yet available.
I learned both
Ray K. wrote:
There are the bddcasts: www.bddcasts.com
They do cost money, but they're worth it, so is the rspec book.
A word of advice:
Learning RoR at the same time with Cucumber and RSpec will require you
to fight a very steep learning curve.
Very often you will neither know how to
Hi Champs, I hope this is not a newbie question.:)
Its not as bad as last time, but you may still get yelled at, especially
since you're posting on a monday
Leave.sum(DAY(end_date) - DAY(start_date) + 1, :group =
MONTH(start_date), :conditions =
[YEAR(start_date)=?,the_year_you_want])
This
M I R wrote:
i was expecting some magic here
The edit page should show the correct selection by magic if the form
is correct.
Could you show us the edit form that isnt working as expected?
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to
(Start disclaimer) New to ruby, new to rails, haven't programmed since
high school. (End disclaimer)
I am working on a personal project which I can use to track my golf
scores and progress but am having difficult keeping a running count of
the amount of holes played.
The app should work like
You can store it in a session variable to keep track across requests
session[:hole_number] = hole_number
--
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
Hi,
I have 2 database for my application development1 and development2.
My default database is development1. But I have to update the
contacts table which is in davelopment2. So I know that I have to
use the establish_connection to establish a connection with the
development2.
I am doing like
On Monday 01 February 2010, Marnen Laibow-Koser wrote:
Michael Schuerig wrote:
On Sunday 31 January 2010, Marnen Laibow-Koser wrote:
If you only include specific helper modules, you can have
multiple methods with the same name, but different
implementations. This can be useful in order
If you are always going to CRUD contacts in development2, then you can
set the connection on the model:
in contact.rb
class Contact ActiveRecord::Base
establish_connection(:development2)
end
in database.yml:
development2:
adapter: mysql
host: localhost
database: railsdatabase
Hi there,
since two days or so my application doesn't seem to execute the system
method. I use it for generating thumbnails like:
def create_thumb(field,image_name)
thumb_name = ...
path = ...
# call ImageMagick method from console
command = convert -thumbnail
On Feb 1, 2:04 pm, Christoph Jasinski
christoph.jasin...@googlemail.com wrote:
The output to the logger is correct. When I execute the command string in
the console (rails console or linux console) it works. But it seems not to
work inside my Rails controller, which is really weird. It
Sharagoz -- wrote:
I think i am just near to resolve it.. Got the logic to it.. I'll tell
you how i am doing it.
---
@month_leaves = Array.new
for i in 1..12
month = i
year = Date.today.year
start_date =
Thank Fred,
didn't know about that possibility. But unfortunately the result is 0. So
it's really bad magic to me. Am trying to set the command path manually.
Maybe that works.
--
You received this message because you are subscribed to the Google Groups Ruby
on Rails: Talk group.
To post to
On Mon, Feb 1, 2010 at 6:11 AM, Kristian kmand...@gmail.com wrote:
Been working a bit lately on implementing Rails app. templates and
generators. It is clear there is a lot of overlap and that features
from generators could be used in app. templates and vice versa.
I will try to port some of
Dan Ci wrote:
(Start disclaimer) New to ruby, new to rails, haven't programmed since
high school. (End disclaimer)
I am working on a personal project which I can use to track my golf
scores and progress but am having difficult keeping a running count of
the amount of holes played.
The
Rails List wrote:
Naveen Dhanuka wrote:
Hi,
I found it difficult to work according to this book with the latest
RoR release.
Please guide as to which RoR release to use.
Thanks...
Best Wishes,
Naveen Dhanuka.
Rails 2.2.2 should work ok.
No. Use the latest release (2.3.5).
Seems that I had to write the full path to convert. That might be cause by a
problem I had with rmagick and had to install ImageMagick in two different
ways (from source and from rpm) at the same time. It had screwed the path to
convert. But somehow the rails console and linux console had no
On Mon, Feb 1, 2010 at 8:45 AM, Michael Schuerig mich...@schuerig.de wrote:
On Monday 01 February 2010, Marnen Laibow-Koser wrote:
Michael Schuerig wrote:
On Sunday 31 January 2010, Marnen Laibow-Koser wrote:
If you only include specific helper modules, you can have
multiple methods with
Since topic, comment and reply are sharing a lot of the same fields as
well as some logic, I reckon I'd make a superclass here for the three of
them.
Topic, comment and reply are basically the same thing, right? A post.
By using a superclass you can base logic like finding which forums a
user
On Feb 1, 3:11 pm, Rick DeNatale rick.denat...@gmail.com wrote:
No, helper methods are indeed methods. They are defined in modules,
and those modules are included into views by the controllers, and can
be explicitly included by other classes.
Aren't all 'functions' technically methods in ruby
My agency is looking for a Ruby on Rails developer in the Louisville,
KY area. Any input would be appreciated.
--
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
On 1 Feb 2010, at 14:49, Christoph Jasinski wrote:
Seems that I had to write the full path to convert. That might be cause by a
problem I had with rmagick and had to install ImageMagick in two different
ways (from source and from rpm) at the same time. It had screwed the path to
convert.
On Mon, Feb 1, 2010 at 10:20 AM, Frederick Cheung
frederick.che...@gmail.com wrote:
On Feb 1, 3:11 pm, Rick DeNatale rick.denat...@gmail.com wrote:
No, helper methods are indeed methods. They are defined in modules,
and those modules are included into views by the controllers, and can
be
As of this writing:
The Getting Started guide (http://guides.rails.info/
getting_started.html) was recently re-written to reflect recent
features in Rails 3.0. But the instructions it gives for downloading
rails in section 3.1 (gem install rails) fetches rails 2.3.8, which
won't work for the
On Feb 1, 4:34 pm, fearless_fool rdp...@gmail.com wrote:
- The Guide should explain how to download Rails 3.0 (iff it is
stable)
- The Guide should offer a pointer to Rails 2.3.8 compatible examples
- The Guide should be rolled back to Rails 2.3.8 until Rails 3.0 is
the main version
On
I have several ruby newbie problems with my deployment
1) First issue.. user rights and group permissions with ruby
enterprise using PLESK
To deploy i did create a git bare repo on my server inside /var/git/
myapp.git
git remote add deployserver ssh://myserver.com/var/git/myapp.git
For
Rob Biedenharn-2 wrote:
On Jan 31, 2010, at 3:50 PM, vihrao wrote:
I tried
%= link_to 'Login', login_user_path(user) %
it did not work
I tried:
%= link_to 'Login', :controller = 'user', :action = 'login' %
that worked.
So I still don't get how the REST Path is defined and can
Marnen Laibow-Koser wrote:
Why not just provide a form for all 18
holes?
Holy verisimilitude Batman!!!
You mean a web page that looks like 99% of the golf score cards in use
today?
Genius, sheer genius.
(no offense intended to anyone, just having fun)...
--
Posted via
Correction on above, I login as git user for my ssh Forgot to add that
sorry about that.
It all works so if syntax above is not correct its just typo.
I think i Need Cap to do these more advanched things like changing
user permissions.
Problem is I could not get it up and running so if anyone
Michael Schuerig wrote:
[...]
What's the point of helper polymorphism? I'm having trouble coming
up with a good use case for it.
format_value, cancel_link are just two examples where generic names are
perfectly understandable within a context, although they may need to do
different things
I use git with my own repo's, along with Capistrano and passenger.
I simply have a special 'vhost.conf' for plesk (you can do this
in .htaccess but I don't like them) and I then create the 'apps'
directory on the server manually with the correct permissions and then
fire off capistrano to do the
Ar Chron wrote:
Marnen Laibow-Koser wrote:
Why not just provide a form for all 18
holes?
Holy verisimilitude Batman!!!
You mean a web page that looks like 99% of the golf score cards in use
today?
Genius, sheer genius.
I am always happy to impress. :D
(no offense intended to
rubybox wrote:
Correction on above, I login as git user for my ssh Forgot to add that
sorry about that.
It all works so if syntax above is not correct its just typo.
I think i Need Cap to do these more advanched things like changing
user permissions.
Problem is I could not get it up and
On Feb 1, 2010, at 12:19 PM, vihrao wrote:
Rob Biedenharn-2 wrote:
On Jan 31, 2010, at 3:50 PM, vihrao wrote:
I tried
%= link_to 'Login', login_user_path(user) %
it did not work
I tried:
%= link_to 'Login', :controller = 'user', :action = 'login' %
that worked.
So I still don't get how the
A lot has been posted about validation issues with associations,
however, I don't see this issue addressed specifically.
ex:
class Foo
has_one :schedule, :dependent = :destroy
validates_presence_of :schedule
class Schedule
belongs_to :foo
validates_presence_of :foo_id
this creates a
Doug wrote:
A lot has been posted about validation issues with associations,
however, I don't see this issue addressed specifically.
ex:
class Foo
has_one :schedule, :dependent = :destroy
validates_presence_of :schedule
class Schedule
belongs_to :foo
validates_presence_of
Frederick Cheung wrote:
- The Guide should explain how to download Rails 3.0 (iff it is
stable)
I used this link
http://oscardelben.com/articles/2009/12/06/how-to-test-rails-3.html
for getting a Rails3 running enviroment.
Simone
--
Posted via http://www.ruby-forum.com/.
--
You received
thanks for the quick responsesome follow up questions:
1. why get rid of the validation on the has_one side rather than the
belongs_to?
2. why do you call it unnecessary?
the requirement that Foo has a schedule (in my example) and vice-versa
seems reasonable.
However, given the above, I
Hi guys,
I need to load a big amount of records from a table (around 2). So
I am using find_each. In the RDoc it says:
When processing large numbers of records, it‘s often a good idea to
do so in batches to prevent memory ballooning.
I am not sure I get it though, indeed:
1- If I do:
Hello,
Is there a way to require a gem only when specific controller is
accessed. I have one plugng that doesn't like co-existing with a
gem(active scaffold and will_paginate).
I have two controllers that use will_paginate, but no active scaffold
and I thought of requiring that gem only for those
Anyone else getting an error when running the rake install task?
j...@jr-desktop:~/dev/rails$ sudo rake --trace install
(in /home/jr/dev/rails)
** Invoke install (first_time)
** Invoke gem (first_time)
** Invoke pkg/rails-3.0.pre.gem (first_time, not_needed)
** Invoke pkg (first_time, not_needed)
Doug wrote:
thanks for the quick responsesome follow up questions:
1. why get rid of the validation on the has_one side rather than the
belongs_to?
On the belongs_to side, you can check for a foreign key within the
object, which is straightforward. There's no simple way to do it from
Thank you. I was confused between named routes and RESTful routes
Rob Biedenharn-2 wrote:
On Feb 1, 2010, at 12:19 PM, vihrao wrote:
Rob Biedenharn-2 wrote:
On Jan 31, 2010, at 3:50 PM, vihrao wrote:
I tried
%= link_to 'Login', login_user_path(user) %
it did not work
I tried:
%=
Rails Engines sounds indeed very interesting. I'll check the screencast.
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
On Monday 01 February 2010, Marnen Laibow-Koser wrote:
Michael Schuerig wrote:
[...]
What's the point of helper polymorphism? I'm having trouble
coming up with a good use case for it.
format_value, cancel_link are just two examples where generic names
are perfectly understandable
Michael Schuerig wrote:
On Monday 01 February 2010, Marnen Laibow-Koser wrote:
Does cancel_link need to do different things depending on context?
If so, what?
Let's say that, in an edit view, you want cancel_link to generate a link
back to the corresponding list view.
I think you could
Hey guys. I want to create a overview page for my application that
contains the latest activity on the site, from a few different
sources. Lets say we have messages, comments, files and tasks (much
like Basecamp, if you've ever used it) and you want to display them
all in one big list, intermixed,
Seirie wrote:
Hey guys. I want to create a overview page for my application that
contains the latest activity on the site, from a few different
sources. Lets say we have messages, comments, files and tasks (much
like Basecamp, if you've ever used it) and you want to display them
all in one
I'm a designer and Rails developer, I'm looking for a designer who's
comfortable working with Ruby on Rails projects to make changes for one
of my existing clients (based in Oxford). The site is running on a
bespoke CMS -- similar to Radiant CMS.
I'm currently engaged in a big 6 month project, so
On Feb 1, 7:53 am, Marnen Laibow-Koser li...@ruby-forum.com wrote:
pepe wrote:
I am sorry but I don't have an answer about the RAM question. However
I would like to answer Marnen s comment. While I agree that letting
the DB do the work for mass record processing should be the best and
This seems like a really obvious question, but I'm blanking on the
solution. I have a simple post/comments relationship that fits the
basic blog model. That means that the form to create a new comment is
in the show action in the Posts controller, but the form links to the
create action in the
Hi All,
I'm looking to improve finding friends on my site, by adding a
''suggestion'' page/area.
BAsically, a query should be run against a logged in user and find
other people from the same town/location. Or that share a similar
hobby etc.
I have a controller and an index page i want to update
Learn it in parallel. Any resource will work just fine, you will learn
the basics easily.
--
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
The problem is that you cant render another controllers action the
traditional way. In the comments controller you have to render :template
= 'posts/show' when a comment fails validation.
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the
I'm not sure I understand your question. Do you need a list of cities
near London that you want to search through? Or you have a problem
with views?
Regards,
Milan
On Feb 1, 11:30 pm, RubyonRails_newbie craigwest...@googlemail.com
wrote:
Hi All,
I'm looking to improve finding friends on my
Well, unfortunately untested code is part of reality. Although I have
tried to be good and test all I could I have not followed a
methodology or tool to get things done right the first time and be
more efficient at it and I am sure there are parts of my code that I
missed, reason why I am so
Hmm, alright, I suspected that might be the case. Suppose it's not
such a big loss. Thanks Marnen!
On Feb 1, 5:06 pm, Marnen Laibow-Koser li...@ruby-forum.com wrote:
Seirie wrote:
Hey guys. I want to create a overview page for my application that
contains the latest activity on the site,
I am running windows xp. I also have aptana and mysql installed.
The problem is that when i try to go and view my project from browser it
says sqlite3.dll was not found, blah blah. I don't sqlite3.dll since i
am using mysql for my databases.
What can i do to fix this?
--
Posted via
pepe wrote:
On Feb 1, 7:53�am, Marnen Laibow-Koser li...@ruby-forum.com wrote:
pepe wrote:
I am sorry but I don't have an answer about the RAM question. However
I would like to answer Marnen s comment. While I agree that letting
the DB do the work for mass record processing should be the
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 to rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscr...@googlegroups.com.
For more
Consider these two models:
class Article ActiveRecord::Base
has_many :posts
end
class Post ActiveRecord::Base
belongs_to :article
end
The ActiveRecord::Dirty module allows one to detect changes in a
model's attribute. In the above example, how does one detect if the
number of posts an
On Monday 01 February 2010, Marnen Laibow-Koser wrote:
These are strictly UI-issues that don't belong in the model.
No they're not. I tend to think models should know how to display
themselves. Otherwise, you wind up with poor view code like your
earlier example and inappropriate
Here's an example for you:
http://ryandaigle.com/articles/2008/3/31/what-s-new-in-edge-rails-dirty-objects
--
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
1 - 100 of 124 matches
Mail list logo