Displaying 20 results from an estimated 200 matches similar to: "Whats the best way to do this?"
2006 Apr 07
1
Formatting form tags for children of parrent data?
This my first Rails project.
All my previous work was done it Perl, so I may be missing the
Ruby/Rails obvious here.
The site I''m working on needs to display archived programs.
Some of the programs have multiple versions, all belonging to the same
listing.
As such, I''ve set-up an extra_files table related to the archive list.
Displaying the extra files was trivial. However,
2006 Jun 08
3
has_many :through updates on delete.
I have a model that looks like this:
class Actor < ActiveRecord::Base
has_many :member_groups, :foreign_key => ''member_id'', :class_name =>
''GroupMember''
has_many :groups, :through => :member_groups, :source => :group
end
class Group < Actor
has_many :group_members, :foreign_key => ''group_id'',:dependent =>
2006 Jan 28
6
Check if user is in right group
What is the best way of checking this?
I have 3 tables:
groups
users
group_members
class GroupMember < ActiveRecord::Base
belongs_to :group
belongs_to :user
validates_uniqueness_of :user_id, :scope => "group_id"
Then I want a method here that checks if a given user is a member of a
given group. What is the right way of doing that?
def
2013 Jul 19
2
puppet master and fileserver separate problem
my environment:
192.168.0.13 puppet.uc.local
192.168.0.14 puppetca.uc.local
192.168.0.15 report.uc.local
192.168.0.16 fileserver.uc.local
192.168.0.17 agent01.uc.local
i want run a master as fileserver (fileserver.uc.local)
the puppet.uc.local and fileserver.uc.local use one ca.pem
on puppet.uc.local, i wrote a class for test
class test {
notify { "hello
2014 Nov 25
3
[LLVMdev] new set of superoptimizer results
Cool! Looks like we do lots of provably unnecessary alignment checks. :)
On Tue, Nov 25, 2014 at 9:03 AM, John Regehr <regehr at cs.utah.edu> wrote:
> Actually, let me save you some time by pointing out the thing that is
> perhaps immediately useful about our recent work, which is the fact that
> Souper now supports "optimization profiling".
>
> If you build an
2014 Nov 24
2
[LLVMdev] new set of superoptimizer results
I hope there's some useful material in here!
http://blog.regehr.org/archives/1192
John
2015 Jul 22
8
[LLVMdev] some superoptimizer results
We (the folks working on Souper) would appreciate any feedback on these
IR-level superoptimizer results:
http://blog.regehr.org/extra_files/souper-jul-15.html
My impression is that while there's clearly plenty of material in here
that doesn't want to get implemented in an opt pass, there are a number
of gems hiding in there that are worth implementing.
Blog post containing
2005 Feb 11
2
Incorrect disk size reported at 20.0 MB
All,
I'm recently seeing an issue with how Samba is reporting
the disk space available from a NFS share. Checking the
properties from a PC system displays all mapped network
drives as having 20.0 MB size with zero free disk space
available. We updated to Samba version 3.0.11 this morning
with no change in results. I have checked the bug reports
and haven't found anything that resembles
2005 Dec 20
7
wrong id for activerecord object when using :joins in mysql
I''m using a find with a :joins clause, like this:
:joins => "JOIN table_b ON table_b.id=table_b_id"
The records returned are used in a scaffold generated list page. The edit,
show, and destroy links are getting the wrong id. They are getting the id of
the table b record.
When I run the query using mysql, I see that the query returns *2* id
columns, the id of the main
2006 Feb 07
4
inexpensive ways to make a rails application highly available? mysql replication?
I''m interested in making a low volume rails application very available. This
means that I would like to have
an alternate server for those times when the primary server is unavailable
for whatever reason.
Virtual private servers are fairly inexpensive so one could have a rails
application on 2 different vps systems (not on the same server, possibly not
even in the same city).
2006 Feb 22
3
is there really a restart task in switchtower? How do you invoke it?
I just created a new rails project "test".
I then did "switchtower --apply-to ~/user/test test"
I then moved into test and tried "rake restart" and got:
kfelkins@lurch:~/user/test$ rake restart
(in /home/kfelkins/user/test)
rake aborted!
Don''t know how to build task ''restart''
I see restart in deploy. Can restart be invoked from the
2006 Feb 14
18
Does shared hosting work? Anywhere?
I moved a rails application to textdrive using their low-cost shared plan.
Once on textdrive my app would display ''proxy errors'' periodically. Hitting
reload
seemed to be all that was needed to get past the proxy error.
After discussions with their support people I decided the proxy errors were
being caused by apache server restarts -- because there were many of us
sharing
one
2005 Dec 30
2
scgi apache routes help needed
I''m trying to get an application running in a sub directory of a site using
apache and scgi. The application runs fine with webrick.
I have a site. Let''s call it "mysite.org". There is a variety of content on
that site.
I would like to add a rails application to that site. Let''s call the
application "myapp".
So we will have urls of the form
2006 Feb 15
12
Does your *shared* hosting account work without errors?
Does your *shared* hosting account work without errors?
I''m interested in both positive and negative reports. If you are willing,
please contribute
- name of the hosting service
- how long you have used them
- your experience ("flawless!", "it''s crap!")
You *do not* need to reply saying your VPS service works great. This is
about *shared* hosting
2006 Feb 07
17
Easy way of dealing with nil properties in templates?
Is there an easy way to deal with nil properties in
templates? All I''m aware of are these methods, and
it''s quite tedious and surely violates DRY.
<%= @member.name unless @member.name.nil? %>
<%= @member.name.to_is %>
<%= "#{@member.name}" %>
csn
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the
2006 Feb 14
3
is shared hosting evil?
I moved a rails application to textdrive using their low-cost shared plan.
Once on textdrive my app would display ''proxy errors'' periodically. Hitting
reload
seemed to be all that was needed to get past the proxy error.
After discussions with their support people I decided the proxy errors were
being caused by apache server restarts -- because there were many of us
sharing
one
2006 Jan 03
2
help me understand association attributes
I have a model with a belongs_to association. The first model is called
Thing and the associated model is User. I''m attempting to assign the user to
the thing.
To accomplish this I used a before_save method, like this:
class Thing < ActiveRecord::Base
belongs_to :created_by, :class_name => "User", :foreign_key =>
"created_by_user_id"
def before_create
2004 Apr 07
2
rsync from solaris to cygwin on xp, certain files always copied
I'm rsyncing a directory on a linux box to a win xp pro with cygwin. Some of the
files are always copied, or so it appears by the progress report and the fact
that a dot version of the file is created and grows to the full size before
completion. Note, the source file is not changing - it is a static file sitting
in a directory and is not modified. Nor is the corresponding file in the target
2006 Jul 23
2
Recommendations for managing tests for non-models and non-controllers in rails?
I''ve got unit tests for a class library that I''m using in a rails project.
Currently this is the only project using this library so I would like to
keep the classes and tests in the rails project. I moved the classes under
[app]/lib. I currently have the tests in [app]/test.
It would be great if these tests were run every time I run ''rake''. What is
everyone
2006 Jan 18
4
Canada on Rails - Schedule Released
We are extremely pleased to announce that we have finalized the schedule
(http://canadaonrails.com/yvr06-schedule.html) for the upcoming Ruby on
Rails conference in Vancouver, BC on April 13th - 14th, 2006.
There are 15 speakers packed into two full days of presentations ranging
from 30 minutes to 90 minute keynotes.
Presentation topics include:
* Where will Rails be riding next?
* Enterprise