Hello,
I would like to generate a model through my rails 3 application.
Eg I can type:
rails g model Abc
at the command line.
I want to do the same through my application.
I have done it before with an earlier version of rails eg :
Rails::Generator::Scripts::Generate.new.run(['model',@name])
Hi folks!
I've been experimenting an error messagem when I try to run unity test
in any model of my project.
Here it is:
/home/fabricio/shopcell/config/environment.rb:1:in `require': no such
file to load -- active_record/version (LoadError)
from
On Oct 5, 10:25 pm, hal he...@heuch2.force9.co.uk wrote:
I have done it before with an earlier version of rails eg :
Rails::Generator::Scripts::Generate.new.run(['model',@name])
but I am not sure of the command in Rails 3, and the 'require'
statements to ensure I won't get any 'no such
Hii all ,
mongrel1.1.2
ruby 1.8.6
apche 2.2.16
i am running Apche frontend to mongrel and trying to upload some large
file(from rails application) to filesystem.Few things i observed.
1 - The uploaded data is stored in a file mongrel.4124.0
2 - the mongrel file is copied to a CGI.4124.0 file
On 5 October 2010 23:31, northband northb...@gmail.com wrote:
Seeking honest, efficient, and productive candidates.
No-one dishonest, inefficient or non-productive need apply then? What
a surprise.
Colin
--
You received this message because you are subscribed to the Google Groups Ruby
on
Hi,
I have following models
class User ActiveRecord::Base
has_many:addresses, :as =:addressee, :dependent = :destroy
accepts_nested_attributes_for :addresses, :allow_destroy = true
end
class Address ActiveRecord::Base
belongs_to :addressee, :polymorphic = true
On 6 October 2010 02:08, omnivore danfdonald...@gmail.com wrote:
Solution was simple, once I found it. Change the bang line in the
rake.rb, found via 'which rake' to point to the ruby version that
houses the gems. Now things work.
Don't bother thanking anyone for pointing you at the cause of
anybody have any idea on it?
Sunny Bogawat wrote:
I have following models
class User ActiveRecord::Base
belongs_to :user_type
has_many:addresses, :as =:addressee, :dependent = :destroy
has_many:photos,:as = :asset,:dependent = :destroy
accepts_nested_attributes_for
Hi,
i have a problem with ActiveRecord 2.3.9, the massassignment doesn't
work. New Database entry is nil for all parameters.
If i use ActiveRecord 2.3.5 everything works fine.
Anybody an idea if there is a bug?
#ActiveRecord::Base.establish_connection(...)
#class Tag ActiveRecord::Base;end
Hi all ,
Am looking to configure mongrels's http_request.rb in
order to
delete mongrel temporary file after upload .This is what i would like to
have
def initialize(params, socket, dispatchers)
@params = params
@socket = socket
@dispatchers = dispatchers
I would like to know there is any opensource mail server application
in rails. I have found this http://mailr.org/
But seems no recent update to this project. Please suggest an
equivalent one
Thanks
Tom
--
Posted via http://www.ruby-forum.com/.
--
You received this message because
No JS on the text areas, maybe it's something to do with the DB type?
Could it be formtastic doing this ?
hmm. thanks will rebuid the form without formtastic and test if it comes
to that - any other ideas, something in the update action of the
controller striping stuff out? It's a standard
Rather odd this, in dev on my mac my jquery calendarpicker works fine.
Same code (I think and checked!) in production and jquery doesn't
activate - any ideas or major gotchas?
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups
Is this good idea to send activation link with encrypted password
--
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
On Oct 6, 9:04 am, bingo bob li...@ruby-forum.com wrote:
No JS on the text areas, maybe it's something to do with the DB type?
Could it be formtastic doing this ?
mysql will trim trailing whitespace from varchar columns, although it
sounds like you are talking about leading whitespace.
Fred
On Oct 6, 2:48 am, Fabrício Dias fabriciorod...@gmail.com wrote:
My application runs smoothly, but I get stuck on this only when trying
running tests.
I know that the statement require 'active_record' works when I run
the applications because if I remove this statement fom
'environment.rb'
Hi all ,
Am looking to configure mongrels's http_request.rb in
order to
delete mongrel temporary file after upload .This is what i would like to
have
def initialize(params, socket, dispatchers)
@params = params
@socket = socket
@dispatchers = dispatchers
mysql will trim trailing whitespace from varchar columns, although it
sounds like you are talking about leading whitespace.
Interesting, thanks, hmmm, well it is mysql, yes and yes it's leading
whitespace but the column type here (in my migration) is either text
or string, can't remember but
Hey,
I've got 2 models: User and Account::Website that look like this:
class User ActiveRecord::Base
has_one :website_account, :class_name =
Account::Website, :dependent = :destroy
end
class Account::Website ActiveRecord::Base
belongs_to :user, :touch = true
before_validation
Forums are here for people to ask questions.
Now you look like a douche every time someone searches for free RoR
hosting.
Actually, I would have said that the forums were for people to get
answers, not much point asking a question if no-one is going to
provide a useful answer.
I have found
On 6 October 2010 04:43, Luke Cowell lcow...@gmail.com wrote:
It just means that it's a GET request from your browser as opposed to POST,
PUT, or DELETE http methods. For example: GET would be used when you want to
simply load a page, POST would be used if you wanted to submit a form.
Yes
I need to change the password with old password confirmation with
authlogic
--
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.
Thanks Greg,
I will take a look a that.
Best regards.
Dominique.
On 29 sep, 21:12, Greg Donald gdon...@gmail.com wrote:
On Wed, Sep 29, 2010 at 1:45 PM, dme69 dmeg...@gmail.com wrote:
Well,
If someone has an idea or had already done that, just let me know.
Here is an example Capistrano
Hi all,
I'm deploying a Rails application in a Ubuntu 10.04 server with
mongrel web server. I connect to server and do stuffs in a ssh client
(PuTTY). And I'm getting stuck with a strange issue:
1. After I connected to server, I start mongrel with : $ start-stop-
daemon -S -d . -x script/server
Hi everyone ,,
How to login and extract our own information from some other
websites using our rails application.?
Thanks in advance !!!
--
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
Updated the message with two more steps
5. I connect to server again, run ps -Af to check and see that the
process's still running. And again, leave the console, switch to
firefox and refresh - the homepage shows everything.
6. But if I exit the ssh session and refresh browser, the web server
Hi, Fred!
Thanks for your resonse.
My config/environment.rb has that exact line:
require 'active_record/version'
Fabrício
On 6 out, 05:13, Frederick Cheung frederick.che...@gmail.com wrote:
On Oct 6, 2:48 am, Fabrício Dias fabriciorod...@gmail.com wrote:
My application runs smoothly, but
On Oct 6, 12:49 pm, Fabrício Dias fabriciorod...@gmail.com wrote:
Hi, Fred!
Thanks for your resonse.
My config/environment.rb has that exact line:
require 'active_record/version'
I should rephrase that - what else is in your environment.rb ? None of
mine have that line and it shouldn't
On Wed, 2010-10-06 at 07:52 +0100, Colin Law wrote:
On 5 October 2010 23:31, northband northb...@gmail.com wrote:
Seeking honest, efficient, and productive candidates.
No-one dishonest, inefficient or non-productive need apply then? What
a surprise.
not to worry Colin, the government
The more I think about this the more Fred's suggestion makes sense - I
suspect that mysql is somehow monkeying with the text on save, trimming
it at the top or removing CR characters or the like.
Is this normal? How can you control this behaviour, seems wierd that it
does this by default if
Here it goes, Fred:
==
require 'active_record/version'
# Be sure to restart your server when you modify this file
# Uncomment below to force Rails into production mode when
# you don't control web/app server and can't set it the
If you generated that controller then perhaps rails assumed a GET was
the safest thing to default?
--
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
Felix Samy wrote:
Is this good idea to send activation link with encrypted password
Why would you want to send the encrypted password anywhere?
--
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
For what it's worth, I have solved this issue. As opposed to localhost,
point your browser to your machines ip address, assuming your development is
local.
Otherwise you could rescue_action_locally to call rescue_action_in_public.
On Wed, Sep 22, 2010 at 4:10 PM, Anthony Foster
On Wed, Oct 6, 2010 at 8:41 AM, Ar Chron li...@ruby-forum.com wrote:
Felix Samy wrote:
Is this good idea to send activation link with encrypted password
then encrypted password?
For what??
--
You received this message because you are subscribed to the Google Groups Ruby
on Rails: Talk
Forgot to add database.yml configuration. Here it is:
your_environment_here:
adapter: sqlserver
mode: odbc
dsn: your_dsn_name_here
username: your_username_here
password: your_password_here
There is no need to use host or port parameter since we're using a
DSN.
On Oct 5, 8:40
Bob Smith wrote:
Any easy way to print on mailing labels that have 3 columns? I need
these to fit in my laser printer. I have no trouble with single column
labels, but I don't know how to make a partial display 3 times across
a page with different records.
render :partial, :collection
For
bingo bob wrote:
The more I think about this the more Fred's suggestion makes sense - I
suspect that mysql is somehow monkeying with the text on save, trimming
it at the top or removing CR characters or the like.
Is this normal? How can you control this behaviour, seems wierd that it
I guess you guys are right. I wanted to avoid the conversation if
possible but your suggestions seem to be the way to go.
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
Colin, I naturally did send Frederick Cheung (hope I have the name
right) thanks directly, although his answer did not actually solve the
problem, and reiterated advice that I also found on (IIRC)
stackoverflow. He did clue me in to checking the locations of ruby,
rake and gems, and I found
I've inherited an EAV database and there's really no option to remodel
it. Data is stored as key_name, key_value pairs
Trying to return a meaningful, unified recordset is far too complex to
be efficient.
I've decided to make use of the MySQL GROUP_CONCAT, and CONCAT_WS
functions to return a fast
jrq wrote:
I've inherited an EAV database and there's really no option to remodel
it.
Why not? Are others depending on the existing schema?
Data is stored as key_name, key_value pairs
Trying to return a meaningful, unified recordset is far too complex to
be efficient.
I've decided to
But he's running this through RedCloth, and whitespace is significant
there, and renders into HTML. He's seeing
~~~
h2. Some Header
Some paragraph.
~~~
collapse to
~~~
h2. Some Header
Some paragraph.
~~~
and that lack of leading newline is somehow significant to his
RedCloth
Marnen Laibow-Koser wrote:
jrq wrote:
I've inherited an EAV database and there's really no option to remodel
it.
[...]
If you can't remodel the DB, decline the project. :)
Hmmm. This question and others like
http://www.ruby-forum.com/topic/218057 are making me start to think that
I
Walter Davis wrote:
But he's running this through RedCloth, and whitespace is significant
there, and renders into HTML. He's seeing
...
Walter
Ahhh.. My bad :) Missed the RedCloth reference. Resume party ;)
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you
Good and reasonable suggestions. I'd rather avoid supplementing the
database end of things. The complete data set is fairly small 20,000
rows and queries are likely to only return 1,000 rows at a time. I
don't think the string parsing is ithat/i complex, a couple of
seconds would be OK, 10
What command line did you use to generate it ? If you specify only one action I
think it assumes that it's a GET request even though destroy would usually
correspond with a DELETE request. I suggest you delete the line and forget
about it.
Luke
On 2010-10-06, at 1:46 AM, Mauro wrote:
why
I recently started with Authlogic and it specifically uses a specifically
generated temporary token for such so that it is not necessary to send an
encrypted password or anything else. I think in general security wise if you
are using encryption that you dont want a lot of your encrypted data
Please quote when replying; otherwise, the discussion becomes difficult
to follow.
jrq wrote:
Good and reasonable suggestions. I'd rather avoid supplementing the
database end of things.
I'm not sure what you mean by this.
Basically, if you're going to use Rails, you have to make sure that
On 2010-10-05, at 10:41 PM, Jim Burgess wrote:
validate do |applicant|
errors.add_to_base(Things must check out!) unless
applicant.check_things
end
def before_save
applicant.non_represented_field = 123456789
end
before_save will only be called if your validations pass, so
PS, this is the authlogic explanation. Their point is that the token
expires, as unless you put in other safeguards if the encrypted password
might be able to be used again, for security purposes it really should be
reset. I think my prev explanation is probably highly unlikely.
Hi,
I have searched the forum to see if this has come up before. If it has
and I missed it I am sorry.
I'm fairly new to Ruby on Rails and have converted an existing site. To
avoid annoying redirects and disrupting search engine results I updated
the routes.rb file so that the old file name
By avoid supplementing the database end of things, I mean I want to
avoid adding more tables or databases to the database engine,
inserting an additional database layer.
Yes, I'm currently intending to munge the unorganized fields into a
string, and deal with the parsing/processing at another
Just to confirm, Walter's interpretation of what I'm seeing is
absolutely right. The lack of the newline at the start is significant as
it means the first heading doesn't get rendered as HTML it just gets put
out as h2. foo, which is, well, rubbish - my investigations continue.
Something funky
I've noticed lots of people online complain about not good documentation
for Rails. I'm a PHP programmer but I'm a newbie on Rails.
I'm creating a form with a drop-down menu. I finally got to do it. I
noticed there is a html_options parameter for select. I was curious as
to what other
On Wed, Oct 6, 2010 at 7:54 AM, Leonel *-* li...@ruby-forum.com wrote:
I noticed there is a html_options parameter for select.
Can somebody please point me to a place in a documentation where I can
find a complete list for the different options for html_options
parameter?
Hi,
html_options are just normal attributes you write on to the html-tags
like: class, style, onchange and so on.
Greets, Max.
Am 06.10.2010 16:54, schrieb Leonel *-*:
I've noticed lots of people online complain about not good documentation
for Rails. I'm a PHP programmer but I'm a newbie on
I'm trying to display a drop-down menu by using an instance variable
from a model.
THIS WORKS...
div class=field
%= f.label :duration %br /
%= f.select (duration, {30 minutes = 30, 1 hour = 60},
:prompt = Select) %
/div
THIS DOESN'T WORK...
Now, I want to populate the values from the model
Thanks, I hadn't noticed it. But it seems there are other that are not
normal attributes.
For example, for select (drop-down menu) you have :prompt = Select,
which is not a normal select attribute.
Maksim Gudovsikov wrote:
Hi,
html_options are just normal attributes you write on to the
Thanks, I hadn't noticed it. But it seems there are other that are not
normal attributes.
For example, for select (drop-down menu) you have :prompt = Select,
which is not a normal select attribute.
Hmm, you're right. I think here is something helpful:
Hi Luke,
Thanks very much for the reply.
You pointed me in exactly the right direction to solve my problem!!
Another approach might be to pass this value from the new action to the
create action through the form using a hidden field.
I tried this already. This had the disadvantage that the
Again: please quote when replying!
jrq wrote:
By avoid supplementing the database end of things, I mean I want to
avoid adding more tables or databases to the database engine,
inserting an additional database layer.
But that's the right way to do it if you can't just get rid of the EAV
Leonel *-* wrote:
I'm trying to display a drop-down menu by using an instance variable
from a model.
[...]
Now, I want to populate the values from the model like this
@durations = {30 minutes = 30, 1 hour = 60, 1 hour 30
minutes = 90, 2 hours = 120}
Then in the form partial I have this
Christine Nyb wrote:
Hi,
I have searched the forum to see if this has come up before. If it has
and I missed it I am sorry.
I'm fairly new to Ruby on Rails and have converted an existing site. To
avoid annoying redirects and disrupting search engine results I updated
the routes.rb file
When I follow through the tutorial on setup Ruby and Rails, I notice
that the scaffold is creating app folder, config folders, etc. for
single website only.
To simulate my current directory structure, I suppost to create
folers:
/my_rails_root/sub_web_1/
/my_rails_root/sub_web_2/
(and so
On Oct 6, 1:32 pm, Fabrício Dias fabriciorod...@gmail.com wrote:
Here it goes, Fred:
==
require 'active_record/version'
# Be sure to restart your server when you modify this file
You should probably stick it after the line
Marnen Laibow-Koser wrote:
Why not just use collection_select?
According to
http://shiningthrough.co.uk/Select-helper-methods-in-Ruby-on-Rails Use
select when you require a basic drop-down selection box populated with
data not sourced from a database
And why not use Haml?
I don't know what
Leonel *-* wrote:
Marnen Laibow-Koser wrote:
Why not just use collection_select?
According to
http://shiningthrough.co.uk/Select-helper-methods-in-Ruby-on-Rails Use
select when you require a basic drop-down selection box populated with
data not sourced from a database
You're right...I
Marnen Laibow-Koser wrote:
What's an example of what you're seeing, and how is it not what you
want?
It's just a message saying pages have duplicate title tags and meta data
and that each page should be unique.
This may be a Google Webmaster Tools question, not a Rails one.
The only
And why not use Haml?
I don't know what that is
But you know what Google is, right? :) Look it up!
haha, thanks, already did. HAML sounds good
Where in the controller are you setting the variable? Let's see the
entire controller method that you're using.
I was setting it at the top of
Leonel *-* wrote:
And why not use Haml?
I don't know what that is
But you know what Google is, right? :) Look it up!
haha, thanks, already did. HAML sounds good
Where in the controller are you setting the variable? Let's see the
entire controller method that you're using.
I was
Leonel *-* wrote:
CONTROLLER
@durations = {30 minutes = 30, 1 hour = 60, 1 hour 30
minutes = 90, 2 hours = 120}
Where did you put this line? You're not showing any context.
ERROR
You have a nil object when you didn't expect it!
You might have expected an instance of Array.
The error
Quoting Duy Lam duylamphu...@gmail.com:
Hi all,
I'm deploying a Rails application in a Ubuntu 10.04 server with
mongrel web server. I connect to server and do stuffs in a ssh client
(PuTTY). And I'm getting stuck with a strange issue:
1. After I connected to server, I start mongrel with : $
anyone?
On Oct 3, 3:37 am, Christian Fazzini christian.fazz...@gmail.com
wrote:
I am using Paperclip by the way
On Oct 3, 3:36 am, Christian Fazzini christian.fazz...@gmail.com
wrote:
My form submits with a column called stream_type, which can either be
full, 30secs or 90secs.
How can
FIXED!
I've moved the statement to a line right after the boot.rb requirement
and now I'm able to run my tests now with no problems.
Thanks, Fred!
On Oct 6, 1:18 pm, Frederick Cheung frederick.che...@gmail.com
wrote:
On Oct 6, 1:32 pm, Fabrício Dias fabriciorod...@gmail.com wrote:
Here it
Michael Schuerig wrote:
On Wednesday 06 October 2010, jrq wrote:
Yes, I'm currently intending to munge the unorganized fields into a
string, and deal with the parsing/processing at another stage. yes,
it's inefficient, but it's a relatively small amount of processing,
and hopefully it will
Can anybody provide code/samples/details on how to do this?
On Oct 3, 3:07 pm, Jim huang@gmail.com wrote:
I'm using Prototype. I mainly want to use the equivalent of :onload
to show a processing graphic, and :condition to check the value in an
input field to see if a request should be
On Oct 6, 2:29 pm, Michael Schuerig mich...@schuerig.de wrote:
On Wednesday 06 October 2010, jrq wrote:
Yes, I'm currently intending to munge the unorganized fields into a
string, and deal with the parsing/processing at another stage. yes,
it's inefficient, but it's a relatively small
I've created a rake task that does various things, one of which is
calling a script. When I call that script from my Rails.root folder,
it works, but it doesn't work inside my rake task. [This is rails 3]
That is, the following line works from bash:
lib/daemons/mailer_ctl start
However, inside
jrq wrote:
On Oct 6, 2:29�pm, Michael Schuerig mich...@schuerig.de wrote:
try:
I've been looking at that. I'm not sure how that gets around the
complex queries, unless MySQL supports Materialized Views, which I
don't think it does (and they're are not a great solution). Or are
you assuming
Hi all, I am having trouble trying to use reflect_on_association
method with given the simplified model:
class Order ActiveRecord::Base
belongs_to :contractor, :class_name = BusinessUnit
end
I expected the reflect_on_association method to return
associated_foreign_key contractor_id but it
Bojan Mihelac wrote:
Hi all, I am having trouble trying to use reflect_on_association
method with given the simplified model:
class Order ActiveRecord::Base
belongs_to :contractor, :class_name = BusinessUnit
end
I expected the reflect_on_association method to return
Hi all
Not really sure how to put the subject as I know what I want to do,
but really not sure how (or if) I can do it.
What I really want to do is this ;
people.find_by_name(:all, :conditions = {name = ?, john, bob,
mike, fred,will} )
or possibly
people.find_by_name(:all, :conditions =
On Oct 6, 9:17 pm, Marnen Laibow-Koser li...@ruby-forum.com wrote:
Bojan Mihelac wrote:
Hi all, I am having trouble trying to use reflect_on_association
method with given the simplified model:
class Order ActiveRecord::Base
belongs_to :contractor, :class_name = BusinessUnit
end
I
The raw SQL way to say this would be name
IN('john','bob','mike','fred','will') but I'm not sure how to say
that in the Rails finder format.
Walter
On Oct 6, 2010, at 3:34 PM, Jonathan Gill wrote:
Hi all
Not really sure how to put the subject as I know what I want to do,
but really not
Hi all,
we are a little internatioal team, looking for freelancig oppurtunity. Does
anyone have idea where to start? Is there any freelancer site especially for
Ruby and Ruby on Rails developers?
Thanks,
gezope
--
You received this message because you are subscribed to the Google Groups Ruby
on
Please quote when replying.
Walter Davis wrote:
The raw SQL way to say this would be name
IN('john','bob','mike','fred','will') but I'm not sure how to say
that in the Rails finder format.
Walter
:conditions = {:name = ['the', 'array', 'goes', 'here']}
Best,
--
Marnen Laibow-Koser
Hello, I'm trying to read .ogv files in my rails application and have
a problem with ff, it won't load the video but will show a big X
instead. After googling for a while I found out the mime types can be
a problem with FF and add the following lines into my /config/
initializers/mime_types.rb
Thanks for that Walter.
Its getting me a little closer, I'll dig at it and hope I can get it
to play nice. I think find_by_sql is my friend here.
Many thanks
Jonathan
On Oct 6, 8:40 pm, Walter Lee Davis wa...@wdstudio.com wrote:
The raw SQL way to say this would be name
Sorry, I did. Please look at my message in a mail application. Google
hides the quote when showing threaded messages.
Walter
On Oct 6, 2010, at 3:50 PM, Marnen Laibow-Koser wrote:
Please quote when replying.
Walter Davis wrote:
The raw SQL way to say this would be name
Ok, Ive got the following models:User, Artist and Video
User is 1:1 with Artist (A user can register to be an artist)
Artist is 1:M with Video (An artist can have one or many videos)
Note that, before any user can register as an artist. He/she must
already have an account with the system. i.e.
On Oct 6, 7:51 pm, Paul p...@nines.org wrote:
So, the require for rubygems must have succeeded, since it failed on
the require for daemons.
Why does it work from the command line, but not from the rake task?
Check the environment used by `` - could it be picking up a different
$PATH (and
Hi Marnen
:conditions = {:name = ['the', 'array', 'goes', 'here']}
Worked perfectly! Many thanks for that!
Cheers
Jonathan
--
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
CiriusMex wrote:
Hello, I'm trying to read .ogv files in my rails application and have
a problem with ff, it won't load the video but will show a big X
instead. After googling for a while I found out the mime types can be
a problem with FF and add the following lines into my /config/
Walter Davis wrote:
Sorry, I did. Please look at my message in a mail application. Google
hides the quote when showing threaded messages.
Then please don't top-post -- quote like this so it's clear what you're
replying to.
Walter
Best,
--
Marnen Laibow-Koser
http://www.marnen.org
Christian Fazzini wrote:
Ok, Ive got the following models:User, Artist and Video
User is 1:1 with Artist (A user can register to be an artist)
Artist is 1:M with Video (An artist can have one or many videos)
Note that, before any user can register as an artist. He/she must
already have an
On Oct 6, 2010, at 3:34 PM, Jonathan Gill wrote:
Hi all
Not really sure how to put the subject as I know what I want to do,
but really not sure how (or if) I can do it.
What I really want to do is this ;
people.find_by_name(:all, :conditions = {name = ?, john, bob,
mike, fred,will} )
or
Rob Biedenharn wrote:
On Oct 6, 2010, at 3:34 PM, Jonathan Gill wrote:
or possibly
people.find_by_name(:all, :conditions = {name =?, john} )
Ive no idea if this can be done, or if it can, how to do it.
Can someone clue me in?
Many thanks
Jonathan
If you want a dynamic finder on name
Also guessing that you probably need to have that hash available to both
the edit and new pages so you will probably need to set @durations using
a before_filter:
before_filter load_durations, :only = [ :new, :edit ]
private
def load_durations
@durations = { 30 minutes = 30,
i have an example app that uses unobstrusive javascript but is running
jquery, take a look and ask any questions you want.
http://github.com/rbritom/Simple_polymorphic_nested_comments
--
You received this message because you are subscribed to the Google Groups Ruby
on Rails: Talk group.
To
1 - 100 of 122 matches
Mail list logo