Hi
I have to copy all the service desk cis to incident cis as part of
converting sd_ticket to incident..So in the Incident model I did
sd_ticket=ServiceDeskTicket.find(sd_id)
Then a new incident @incident is created here
sd_cis=sd_ticket.get_sd_cis #here I got all the service desk cis
(Relati
Jon wrote:
> def create
> @review=Review.new(params[:review])
> @[EMAIL PROTECTED]
thats correct syntax (if @album is a object of Album model)
>
> i'm not sure that @[EMAIL PROTECTED] is the correct syntax, but even
> at the command line when I instantiate an object of type Review an
now i am working in a rails project version 1.2.3
but i like to work in rails 2.1.1
i thing by freexe the 1.2.3 gemm into vendor will solve the problem
but i have 35 plugin in my project(which is version 1.2.3)
so i worried about freezeing old gem into vendeor
any help appreciated?
thanks
--
Po
Hi,
Above code is working fine,
you assign the memcached server where you run memcache server
memcache_servers = "localhost:11211"
above line you replace localhost as IP(i.e,)where memcache server
running
ex:memcache_servers = "168.162.10.26:11211" -- like this
and start memcache server
simple_captcha does not work in test environment
---
Hi,
I have been using simple_captcha and it works fine and make myself
happy. When I moved my app to test environment, It does not throwing
message when the letters in t
Pokkai Dokkai wrote:
> now i am working in a rails project version 1.2.3
> but i like to work in rails 2.1.1
> i thing by freexe the 1.2.3 gemm into vendor will solve the problem
> but i have 35 plugin in my project(which is version 1.2.3)
> so i worried about freezeing old gem into vendeor
>
> a
I have two models, Review and Album.
Album has many reviews, and Review belongs to Album as seen below in
their respective model files.
class Review < ActiveRecord::Base
belongs_to :album
end
class Album < ActiveRecord::Base
has_many :reviews
end
I then added a form to submit r
respond_to do |format|
format.html # index.html.erb
format.xml { render :xml => @directories }
end
#
The model directory belongs to a software instance.
--
Anthony Ettinger
408-656-2473
http://anthony.ettinger.name
--~--~-~--~~~---~--~~
You r
On Fri, 2008-09-26 at 01:38 +0200, Bryan M. wrote:
> I'm trying to use jQuery to write all my js unobtrusively, and running
> into a bit of a problem when triggering the format.js block in IE6 (and
> possibly IE7). It returns the JSON string no problem, but instead of
> parsing it, IE6 asks to dow
*About:*
http://stonean.com/wiki/classy-inheritance
Classy Inheritance simplifies the definition and implementation of one
object depending on another object. For example, a User object depending on
a Person object. If you do the following:
class User < ActiveRecord::Base
depends_on :person
It appears the default sort direction is always sent to the query,
even if a different column is clicked to sort.
For example:
add_to_sortable_columns('search', :model => Status, :field => 'name',
:sort_direction => :desc)
that results in:
ORDER BY statuses.name DESC,directories.updated_at DE
heimdull wrote:
> rails newapp
> cd newapp
> ruby script/generate model Page
>
> does that give anything?
Hi heimdull,
Yes, it generates the following, which is what shows in the tutorial:
exists app/models/
exists test/unit/
exists test/fixtures/
create app/models/page.r
rails newapp
cd newapp
ruby script/generate model Page
does that give anything?
--~--~-~--~~~---~--~~
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@goo
Finally about to make the move from 1.2.6 to 2.? and am curious about
strategy...
I've looked at a bunch of postings across the web about upgrading, but
many of them seem to be written back when 2.0 was only a RC and it
seems like this has been a changing picture throughout the year (one
of the r
Got it!
This was a tricky one. I'll post the solution here since I've seen
some other posts where people got unsatisfactory results. I'm pleased
with how this came out. Here is my ProductImage class, in its
entirety.
class ProductImage < ActiveRecord::Base
belongs_to :product
acts_as_list
I'm trying to use jQuery to write all my js unobtrusively, and running
into a bit of a problem when triggering the format.js block in IE6 (and
possibly IE7). It returns the JSON string no problem, but instead of
parsing it, IE6 asks to download the resource as a .js file.
So if my url is '/pictur
Or better yet, any solutions/patches?
--
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@goog
As great as Rails 2.1 is, I for the life of me cannot figure out why
polymorphic associations do not support reconfiguring the type column
used.
For example, I have no way to do a polymorphic association using a
lookup hash which maps an integer to a class name.
Storing a TINYINT unsigned is waa
Hello-
I'm trying to get a list of attachment_fu objects (type of
ProductImage) to play well with acts_as_list. Essentially, a single
Product can have multiple ProductImages arranged in a sorted list
(which feeds into a slideshow, ultimately).
If it wasn't clear from the title, this isn't going
Hi,
Can you access any other sites using http from within your
controllers?
I see you are using Windows - does firewall allow your mongrels/
webrick to access Internet?
If it's timeout issue, you can easily increase timeout with net/http
library like:
Net::HTTP.start('www.whatever.org.uk') { |h
On Thu, 2008-09-25 at 13:52 -0700, Dan Paul wrote:
> Thanks for the response, sorry I'm totally new to this any way you can
> elaborate or show example? Any help would be greatly appreciated,
> thanks in advance
>
> On Sep 25, 11:53 am, andres <[EMAIL PROTECTED]> wrote:
> > On Thu, 2008-09-25 at
Hi All,
I am working the 20 minute wiki tutorial
http://sl33p3r.free.fr/tutorials/rails/wiki/wiki-en.html. Right at the
beginning after I get my web server up I try to create the Page model in
the command line:
script/generate model Page
After I hit Enter nothing happens. I've searched online a
Hi,
On 25 Wrz, 21:02, Fernando Perez <[EMAIL PROTECTED]>
wrote:
> My app, relies on request.domain to display some data according to the
> domain.
>
> However during RSpec tests, the request.domain is set to "test.host". Is
> there a way I can manually set it for the test environment?
Yes, you c
Note that writing to the db every time something on your site is viewed can
really limit your capacity and scale and hasten the day when you'll need to
think about multi-master configuration. So unless you're using something
like amazon SimpleDB, which scales for you, it might be better to figure
I poked around and figured this out myself. I had to add the following
to my document model:
class Document < ActiveRecord::Base
...
acts_as_paranoid
#do not destory file (usually called from after_destroy)
def destroy_file
return
end
end
Chris Bloom wrote:
> I'm now wondering i
mike, yeah. i'm 2.1.0 and i have it as well.
On Sep 23, 2:06 pm, Mike Breen <[EMAIL PROTECTED]> wrote:
> Loading development environment in sandbox (Rails 2.2.0)
> Any modifications you make will be rolled back on exit
> /my_project/vendor/rails/activerecord/lib/active_record/base.rb:
> 1760:in
> wrong number of arguments (1 for 0).
Well, according to this it's trying to tell you that you are sending 1
argument to a method that expects 0.
> MailingsWorker#send_mailing({:uid=>"mailings_workers:send_mailing:ab6867ccb04cb1180afeb50c7f8
And MailingsWorker#send_mailing would be that method.
Thanks for the response, sorry I'm totally new to this any way you can
elaborate or show example? Any help would be greatly appreciated,
thanks in advance
On Sep 25, 11:53 am, andres <[EMAIL PROTECTED]> wrote:
> On Thu, 2008-09-25 at 11:35 -0700, Dan Paul wrote:
> > Hello,
>
> > So I am trying to
On Thu, 2008-09-25 at 12:11 -0700, Nathan R wrote:
> I am having this same problem, but I need to do this with ajax.
> any ideas? I've been racking my brain on this for a few hours now and
> am losing it,
>
> On Sep 22, 6:47 am, jney <[EMAIL PROTECTED]> wrote:
> > Hi erol,
> >
> > Try this :
I solved it by appending the first method to the chain.
I have another problem:
I want to chain 2 named_scopes that both have a :joins in their
definition. The problem is that the :joins of the second named_scope in
the chain doesn't get added to the query. IS that normal behavior?
--
Posted
Hi,
Well, i haven't tried it myself, but as far as the "High Performance
MySQL" book can say, this is possible and there is nothing preventing
you from doing it, you just have to be sure about the risks you will
be taking, as even with replication, the slave database using MyISAM
could get corrup
I am having this same problem, but I need to do this with ajax.
any ideas? I've been racking my brain on this for a few hours now and
am losing it,
On Sep 22, 6:47 am, jney <[EMAIL PROTECTED]> wrote:
> Hi erol,
>
> Try this :
>
> <% form_for(@master_model) do |f| %>
> <%= f.error_messages
My app, relies on request.domain to display some data according to the
domain.
However during RSpec tests, the request.domain is set to "test.host". Is
there a way I can manually set it for the test environment?
Thanks for your tip
--
Posted via http://www.ruby-forum.com/.
--~--~-~--~-
Hi -
We're pondering whether this is possible or whether anyone else has
done this. We would like to write records to an innodb database
(master) but have the front-end of out app interface a myisam (slave)
database. So have our app use two databases.
Reason is - we want to allow users to safe
On Thu, 2008-09-25 at 11:35 -0700, Dan Paul wrote:
> Hello,
>
> So I am trying to simply track the number of hits a link has received
> and display that number on the site so other users can see which links
> are more popular. So once the link is clicked on it adds a +1 value to
> the hits column
Hello,
So I am trying to simply track the number of hits a link has received
and display that number on the site so other users can see which links
are more popular. So once the link is clicked on it adds a +1 value to
the hits column in the database and then redirects the person to the
url that
John Do wrote:
> So you can't really use a view call a controller/helper methods with
> arguments via link?
You can call helpers from views, but not controller methods. Keep in
mind that the view is what's going to get rendered to the client. So any
reference to a controller method is in the c
Hi Timothy, your code is right. Here's the thing:
Inflector.classify is used to see how rails converts to table_name to Model
name. So you have to do this:
Inflector.classify "progresses"
Inflector.pluralize gives you the contrary.
If you want more information take a look at this:
http://api.r
I've got a problem in that users are deleting a paranoid model through
the application, including dependents. Some of these dependents are
paranoid too, but not the attachments. (I'm using DB file storage.) I
need to be able to un-delete these things and I'm now wondering if
acts_as_paranoid will
Ad Richards wrote:
> I have got as far as making it so that a grade field is automatically
> created for each new assignment:
>
> def create
> @assignment = Assignment.new(params[:assignment])
> @gradation = @assignment.gradations.build(params[:gradation])
>
> But I don't know how to p
So you can't really use a view call a controller/helper methods with
arguments via link?
Let's say I have a helper with method
def say_hello(string1, string2)
puts "#{string1} say hello to #{string2}"
end
I know in the view, I can do
<% say_hello("Bob", "Jill") %>
and the console will print o
That should be because you haven't modified the name property of you text
field.
On Thu, Sep 25, 2008 at 10:39 AM, Lost Warrior <
[EMAIL PROTECTED]> wrote:
>
> hi i am having a search option in my application.after the search url is
> going as /search?query=linux.
>
> I want to achieve it as /sea
Hi,
On Wed, Sep 24, 2008 at 8:21 PM, Jean Nibee
<[EMAIL PROTECTED]> wrote:
> When I use a fixture yml file to load setup data into my database my
> created_at fields are always being set to '-00-00 00:00:00'
The fixtures code in 2.0+ should set your timestamped columns to
Time.now automatica
James Burka wrote:
> I would recommend 'The Rails Way' by Obie Fernandez I found that much
> more helpful than the Agile Web Dev book
>
> On Sep 18, 5:07�pm, Robert Walker <[EMAIL PROTECTED]>
I would certainly not recommend the Rails Way to a beginner.
The best IMHO is the Agile Web Dev with Ra
Hi,
I have a named_scope that retrieves all the products for the current
website based on its domain name:
--
named_scope :site, lambda { |website_name| { :joins => :site,
:order => 'products.created_at DESC',
:conditions => ['sites.domain_name = ?', website_name]}}
Thanks Maurício,
Ok, I'll also give it a shot :) ... Damn, I've now tried Ferret -
Ultrasphinx ... and now Solr :) . Madness. Actually I kind of liked
Ultrasphinx.
--
Posted via http://www.ruby-forum.com/.
--~--~-~--~~~---~--~~
You received this message beca
http://www.rubyinside.com/how-to-use-gmails-smtp-server-with-rails-394.html
This is a good solution.
--~--~-~--~~~---~--~~
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 am having some serious problems with site that's already live. It is
using RoR 1.2, ferret 0.11.6 and most recent acts_as_ferret plugin.
Most of the day, site is doing pretty well, is quick and search is
reliable. But, at some point, it just "locks" and stops responding,
one instance of mo
If you really need index updates to happen when a record is updated,
you should use Solr.
On Thu, Sep 25, 2008 at 2:01 PM, Maarten Porters
<[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I'm trying out Ultrasphinx instead of ferret. Unfortunately it seems not
> to be possible to update the index (in an ef
Hi,
I'm trying out Ultrasphinx instead of ferret. Unfortunately it seems not
to be possible to update the index (in an efficient way) after creating
or updating a record. I managed to run the update index rake task, but
that's not a good option.
Here is what I tried:
def update
@user = Us
If nobody knows that, mayby someone can tell me how update the :password
befor saving?
Greetings Andi
--
Posted via http://www.ruby-forum.com/.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk"
I hope this day finds you well.
I need to generate Spider charts (aka radar charts) , and am using Gruff
to do so.
How can I show lines and axis numbers on a Spider chart? Here's what
I'm trying to make:
http://img.skitch.com/20080925-m573hhdy4n4x6i92s17knjqjeg.jpg
How can I ha
I have an application that generates an ever growing list of stock
reports. I find myself some method in a controller creating a
connection to the database (postgres in this case), executing a custom
sql, using the data returned to create one or more graphs with gruff,
and sending them off to be d
Sure, there are other options out there to describe it. Would this be a
consideration that the inflector is broken though?
Jeff Cohen wrote:
> Any chance you can use "progression" or "step" instead of "progress"?
> Might be easier for the inflector to figure things out...?
>
> Jeff
--
Pos
On Sep 25, 11:02 am, Timothy Johnson <[EMAIL PROTECTED]
s.net> wrote:
> I have this in my Inflector file:
> ActiveSupport::Inflector.inflections do |inflect|
> inflect.irregular 'progress', 'progresses'
> end
>
> but when I run:
>
> >> "progress".classify
>
> i get
> => Progres
>
> Obviously thi
I have this in my Inflector file:
ActiveSupport::Inflector.inflections do |inflect|
inflect.irregular 'progress', 'progresses'
end
but when I run:
>> "progress".classify
i get
=> Progres
Obviously this is messing up some internals. Progress doesn't really
count as "uncountable"
Any help is a
hi i am having a search option in my application.after the search url is
going as /search?query=linux.
I want to achieve it as /search/linux using routes.rb
i am giving it as
map.search 'search/*query_text',:controller => "home",:action =>
"search"
but it is coming as search?query=linux
--
Po
Have you tried map.resources :main?
On Sep 21, 10:50 pm, Grayson Piercee <[EMAIL PROTECTED]
s.net> wrote:
> Ryan Bigg wrote:
> > How are you mapping it in the routes.rb?
>
> map.resource :main
> --
> Posted viahttp://www.ruby-forum.com/.
--~--~-~--~~~---~--~~
You
A good idea. The Beta PDF is available straight from PragProg ... you
can give that a shot as well.
On Sep 20, 6:40 am, "Commander Johnson" <[EMAIL PROTECTED]>
wrote:
> You can learn rails with v2, but some things like migration file names and
> especially dynamic scaffolding will be different. I
Thank you all so much for those suggestions.
I have changed the settings of my SMTP. But now I get
getaddrinfo: servname not supported for ai_socktype.
:/PROGRA~1/BITNAM~1/ruby/lib/ruby/1.8/net/protocol.rb:209:in `initialize'
C:/PROGRA~1/BITNAM~1/ruby/lib/ruby/1.8/net/protocol.rb:209:in `new'
On Sep 25, 3:01 pm, "Jon Liu" <[EMAIL PROTECTED]> wrote:
> Fred,
> Thanks.
>
> So I ran rake db:migrate VERSION=0. Then I tried to view my table structure
> under the console command line, to which I got an error(as expected since we
> roll back to version 0)
>
> I ran the rake db:migrate again
That's very helpful, many thanks. The mists have cleared!
Until the next time. hehe.
bb
--
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
Fred,
Thanks.
So I ran rake db:migrate VERSION=0. Then I tried to view my table structure
under the console command line, to which I got an error(as expected since we
roll back to version 0)
I ran the rake db:migrate again and now I have my updated table.
Why do you have to rollback a version t
On Sep 25, 8:43 pm, bingo bob <[EMAIL PROTECTED]>
wrote:
> But two things
>
> > @adverts = current_user.adverts || [] <-- can you explain the "|| []" part?
It assigns the empty array [] to @adverts if current_user.adverts is
nil, otherwise it works just like a normal assign. Think of it as a
shor
The only thing I change is that before_filter :detect_request
Detecting the browser's user agent works (see below), but detecting
subdomains does not.
def iphone_request?
# Mobile Safari
request.env["HTTP_USER_AGENT"] && request.env["HTTP_USER_AGENT"][/
(Mobile\/.+Safari)/]
end
On S
I tried to change the DOMAIN name . Now I am recieving End Of File reached
error.
getaddrinfo: no address associated with hostname.
lib/smtp_tls.rb:10:in `initialize'
lib/smtp_tls.rb:10:in `open'
lib/smtp_tls.rb:10:in `do_start'
lib/smtp_tls.rb:10:in `do_start'
app/controllers/email_controller.r
The reason no error is thrown has nothing to do with Rails, but Ruby.
IO write is the actual method that is being called, correct?
See this: http://www.ruby-doc.org/core/classes/IO.html#M002296
According the the Ruby API is returns the number of bytes written. I
would suggest you add a check on y
Email Senders in distress,
"getaddrinfo: no address associated with hostname. "
Likely now ruby/smtp is trying to do a DNS lookup on the domain you
provided. So if you made a hostname that actual does not resolve to
anything it will get upset. The simplest thing to do is add the new
domain to yo
Frederick Cheung wrote:
> On 24 Sep 2008, at 15:52, Vicky Shaw wrote:
>
>>> to
>>> change the mode to 'wb'
>> I am using OpenSuse OS. I guess 'b' is needed on Windows OS to save it
>> as a binary file.
>> Problem: I don't see any such file on my filesystem.
>>
> more likely that you don't h
> Hi, could you tell us about the actual configuration of ferret? How's
> Ferret
> working in development mode without the ferret_server? Is the
> ferret_server
> up and operational in the production environment?
>
> -Conrad
Hi Conrad,
In development mode, I'm just using the local index wit
that's it!
Thanks !
2008/9/25 joserwan <[EMAIL PROTECTED]>
>
> Maybe Aptana automatically include links to prototype as it misses.
> You have to include in your page header :
>
> <%= javascript_include_tag :all %>
>
> or less (don't know wich file is needed for the updater) :
>
> <%= javascript_
On 25 Sep 2008, at 13:53, Ad Richards wrote:
>
> Oh that's a good point, I didn't consider that.
>
> What do you mean by working around the editing stuff?
> Do you mean like including an "if, else" somewhere in the view.
> i.e: if a grade already exists for a student and assignment then show
> i
Maybe Aptana automatically include links to prototype as it misses.
You have to include in your page header :
<%= javascript_include_tag :all %>
or less (don't know wich file is needed for the updater) :
<%= javascript_include_tag 'prototype' %>
Erwan
On Sep 25, 4:16 am, "Alexandre Petitjean"
Oh that's a good point, I didn't consider that.
What do you mean by working around the editing stuff?
Do you mean like including an "if, else" somewhere in the view.
i.e: if a grade already exists for a student and assignment then show
it, otherwise create a new one (with a default value).??
--
OK,
But two things
> @adverts = current_user.adverts || [] <-- can you explain the "|| []" part?
and...
I want to check for it being nil, would I do this in the controller (I
think I must as the error is generated from that point - i.e. it doesn't
get as far as the view if there are no ads
On Thu, Sep 25, 2008 at 4:30 AM, Maarten Porters <
[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I'm having some problems on a particular acts_as_ferret model.
> Rebuilding the index with Model.rebuild_index does not seem to work. No
> results are returned after indexing. However,
> when I update each rec
I was wondering how can I call an action of a particular controller when a
person clicks on a particular div. Any related pointers?
--
Thanks,
Jaikishan
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails
Hi Abel,
Ah, so that's how it works? So I am guessing if you have a debit card
without a credit card number you can't sign up for paypal?
--
Posted via http://www.ruby-forum.com/.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the G
On Sep 25, 8:07 pm, bingo bob <[EMAIL PROTECTED]>
wrote:
> > good point, but wrong for Rails.
> > Use your first version.
>
> > @adverts = current_user.adverts
>
> OK, but the thing is, this fails if the user doesn't have any adverts?
You'll need to test for current_user.adverts first before you
John Do wrote:
> Controllers/files_controller.rb
> class FilesController < ApplicationController
> def export_database(obj)
> obj.save_to_file
> end
> end
>
>
>
> Views/files/show.html.erb
> <% [RmEnv, RmProc].each do |db_obj| %>
> <%= button_to "export database #{db_obj}", :action => exp
> good point, but wrong for Rails.
> Use your first version.
>
> @adverts = current_user.adverts
>
OK, but the thing is, this fails if the user doesn't have any adverts?
--
Posted via http://www.ruby-forum.com/.
--~--~-~--~~~---~--~~
You received this message
no real help for your actual problem.
But we moved an existing project from ferret to sphinx,
for exactly the reasons you mention. Everything working
fine in dev, but fails in prod.
If you google around a bit, you'll find that this seems a common
problem with ferret.
I would recommend moving to
Hi, I'm new in Ruby on Rails and I don't know how can I achive
something like this:
@switchs = Switch.find(:all)
for switch in @switchs
if current_user.shifts.count(:all,:conditions=>["date = ? and
shift = ?",switch.destiny_date, switch.destiny_turn]) !=0
@valid = switch
> Hi,
>
> I am new to ruby on rails.I am having problem reading excel files. I
> tried using gem 'parseexcel' but still the error is coming.
> Could you please help me with the code and how to use this gem? Is
> there any better way to read excel sheets.
>
> Snippet of Code:
>
> require 'rubygems
Hi,
I'm having some problems on a particular acts_as_ferret model.
Rebuilding the index with Model.rebuild_index does not seem to work. No
results are returned after indexing. However,
when I update each record manually, the index seems to be correct.
This is my model:
class Article < ActiveRec
On 25 Sep 2008, at 11:17, Ad Richards wrote:
>
> Thanks fred,
>
> The problem with creating gradations separately when students complete
> assignments, is that I am then left with no fields in my view in which
> to enter grades. My plan was to have it so that when an assignment was
> created, a
Hi Peter,
sounds like you're right. The problem was solved after updating
rubygems.
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.
Hi guys, I'm running a strange problem sending emails. Basicly I'm
getting this exception:
ArgumentError (wrong number of arguments (1 for 0)):
/usr/lib/ruby/gems/1.8/gems/activerecord-2.1.1/lib/active_record/
base.rb:642:in `initialize'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.1.1/lib/active_r
> You might want to try Dr. Nic's Magic Multi-Connections to make the
> job easier.
Nice name anyway ;)
> http://magicmodels.rubyforge.org/magic_multi_connections/
I'll going to see..
Thanks!
--
Posted via http://www.ruby-forum.com/.
--~--~-~--~~~---~--~~
You
On Sep 25, 6:01 pm, Thorsten Müller <[EMAIL PROTECTED]> wrote:
> Depends on some details. the results:
>
> Date.today: "2008-09-25"
> Time.now: "2008-09-25 11:56:21"
>
> So Date.today would get you all records of today, including those from
> the morning to now.
> Time.now includes the time, ignor
On Sep 25, 6:08 pm, Al Shox <[EMAIL PROTECTED]> wrote:
> Three db accounts, and they are fixed.
> --
> Posted viahttp://www.ruby-forum.com/.
You might want to try Dr. Nic's Magic Multi-Connections to make the
job easier.
http://magicmodels.rubyforge.org/magic_multi_connections/
--~--~-~-
Thanks fred,
The problem with creating gradations separately when students complete
assignments, is that I am then left with no fields in my view in which
to enter grades. My plan was to have it so that when an assignment was
created, a corresponding grade field would be created for each stude
Hi there Erol!
Thanks so much for your help!
> User.find(:all, :joins => :roles, :conditions => ["roles.name IN (?)",
> ["admin", "editor"])
That's wy better!
Thank you
--
Posted via http://www.ruby-forum.com/.
--~--~-~--~~~---~--~~
You received this messag
i am using starling and workling for sending mail in background This
is giving me an error
Calling
MailingsWorker#send_mailing({:uid=>"mailings_workers:send_mailing:ab6867ccb04cb1180afeb50c7f8f5ad4",
:email=>"[EMAIL PROTECTED]"})
FAILED to process queue mailings_workers__send_mailing.
# could
> I have this working with the following code, as I say in the adverts
> controllers index action.
>
> @adverts = current_user.adverts
>
> Now then, I figure that in the correct place to do the finding of a
> users adverts is in the adverts model. This should give me the ability
> to do the find a
Erol Fornoles wrote:
> On Sep 25, 8:03�am, Al Shox <[EMAIL PROTECTED]> wrote:
>> > � :username => "admin",
>> solutions.. and I really don't want!!
>> --
>> Posted viahttp://www.ruby-forum.com/.
>
> Not necessarily. How many kinds of db user accounts do you have? Are
> they fixed, or do you have
> I think Date.today might be more logically correct than using
> Time.now, though.
Depends on some details. the results:
Date.today: "2008-09-25"
Time.now: "2008-09-25 11:56:21"
So Date.today would get you all records of today, including those from
the morning to now.
Time.now includes the tim
I'm trying to follow Fat Model Thin Controller, and generally just do
things right as much as possible and need some help at this early stage
of development.
I have some users (courtesy of restful_authentication).
I’ve got my relationships such that a User has_many Adverts and an
Advert belongs
On Sep 25, 5:22 pm, Carmine Moleti <[EMAIL PROTECTED]>
wrote:
> Hi to everyone,
>
> I have my User model which has_many roles.
> Now, I've the need to find all users with certain roles.
>
> At first I thought of something like
>
> User.find(:all, :joins => :roles).select { |u| u.has_role?(:admin)
Hey Jeffrey,
I did indeed update to rails 2.1 recently ... It really makes sense
because I was probably updating associated models. Forcing updated_on =
Time.now fixed the problem.
Thanks Jeffrey
--
Posted via http://www.ruby-forum.com/.
--~--~-~--~~~---~--~~
1 - 100 of 117 matches
Mail list logo