Displaying 20 results from an estimated 42 matches for "aljord".
2007 Mar 16
7
how to send mp3 inline?
hey all,
I''m trying to do a:
send_file @file, :type => ''audio/mp3'', :disposition => ''inline'' ,:stream=>true
I tried with all browsers and it always asks me to download the file
or open it with a player. Is there a way to make it open in the
embeded player (QT,Windows media player,Mplayer etc)? Only with
konqueror if I open in new tab then I
2007 Nov 09
26
RSpec on Rails 2.0
I have a project on edge rails that I''m trying to convert from Test:Unit
to rspec. I have the rspec gem version 2338, the rspec and
rsepc_on_rails version 2831 in vendor/plugins, and rails version 8117 in
vendor/rails.
I''ve been able to get a few specs passing, have gotten the specs running
from autotest, and am able to do "rake spec:doc" and get the basic
command
2006 May 14
3
need help for simple form tag (noob)
when the user click on "Search" I would like it to point to
http://curentpage/?filter=searchtext (the filtering code is already
written)
it would look like this:
<%= start_form_tag(url_for_options = {<something>}) %>
<%=text_field (<my_filter>) %>
<%= submit_tag(value = "Search")%>
any idea how to do this?
thanx in advance
2008 Apr 28
16
GiT and Edge/Trunk Rails
I have a sub-application project that I had previously converted to edge
rails under svn. Originally, vendor/rails was set up with svn:externals
so that an svn update at the project''s root would pull the latest trunk
along with all the other updates. Since Rails has moved to GiT and
depreciated svn I decided to remove the svn:externals reference for
vendor/rails and reinstall trunk using
2006 Oct 25
4
need help on special HABTM relation
hey all,
I have three tables like this:
forum (id,title)
usergroup(id,title)
forum_perms(usergroup_id,forum_id,read,write,post)
is there a way to deal with that kind of relation with rails such as by
using has_and_belongs_to_many kind of stuff?
thanx in advance
Pat
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
2007 Jun 06
4
globalize+acts_as_ferret
Hey all,
I''m using acts_as_ferret and globalize. I stumbled upon that post on google:
http://osdir.com/ml/lang.ruby.ferret.general/2007-01/msg00068.html
does anybody know if it''s included in the latest a_a_f or if it''s
planed to be? I can''t seem to find anything about it.
thanx in advance
Pat
2007 Aug 15
2
need help on writing a plugin
Hey all,
I''ve just "script/generate plugin my_plugin" and I would like to
"overload" one of my view. Say I have app/views/sessions/new.html.erb
and I would like to rewrite that file without touching it using the
plugin. Any idea how to do this? I would also like to do the same
thing with models and controllers of my application. I couldn''t find a
tutorial
2010 Apr 30
2
Steve Jobs about theora
I guess you've all read it already, but here it goes:
"All video codecs are covered by patents. A patent pool is being
assembled to go after Theora and other ?open source? codecs now.
Unfortunately, just because something is open source, it doesn?t mean
or guarantee that it doesn?t infringe on others patents. An open
standard is different from being royalty free or open source.
Sent
2006 May 14
4
searching on foreing keys
Hey all,
I''m using a simple search function. It''s working
great except for foreign keys.
I have one table pets (id,name,owner_id)
and another table people(id,name)
owner_id being a foreign key of pet pointing to people name.
here it is on the pet controller:
@paginator, @pets= paginate(:pets, :conditions =>["name OR owner_id
like
2006 Dec 16
5
trying to add another app
hey all,
I have an app working great with apache2 and mongrel_cluster.
However, I''m trying to run another application and now when I go to
app1.comit falls to
app2.com and the opposite. That''s probably because I messed up somewhere
with the cluster.
this is the content of my conf.d/app1.proxy_cluster.conf:
<Proxy balancer://mongrel_cluster>
BalancerMember
2006 Dec 07
2
need to transfer data from old php like db to rails style db
hey all,
I have two tables like that from an old php project:
artists(id,name)
albums(id,artist_id,album_name)
and I need to transfer the data of this database to three tables that
look like this:
artists(id,name)
albums(id,name)
artists_albums(album_id,artist_id)
any idea what''s the fastest query to do this?
thanx in advance
Pat
--~--~---------~--~----~------------~-------~--~----~
2006 Jul 17
6
3 newbie questions
hey all,
I have 3 tables like this:
Images (id,name)
Tags (id,name)
ImagesTags(imageid,tagid)
in my image model I do a "has_and_belongs_to_many :tags" but to make
it work I need to rename ImagesTags(imageid,tagid) to
Images_Tags(image_id,tag_id). My question is that given that I can''t
rename the table, is there any way to make it work with the original
names?
Second question:
2006 Aug 17
1
2 newbie question
Hey all,
I have 2 newbie questions,
1st question:
<%= collection_select (:region, :id, @regionall, :id,
:title,options={:prompt=>"- Select cat -"}) %>
Ignores the :prompt part while options={:include_blank => true} works.
Any idea what I?m doing work with :prompt ?
2nd question:
How can make my collection_selected to display it''s third key by default?
I know it has
2006 Nov 04
1
search function
Hey all,
I''m writing a search function for my page but I get stuck at the form
part. When I press submit all the params are nil.
here is my list.rhtml:
<%= start_form_tag :controller=>''ads'', :action => ''search'' %>
<%= render :controller=>''cats'',:partial => ''/cats/search'' %>
<p> <%=
2006 May 13
1
need help for my link_to
I have a model Document that shares the same primary id with another
model Upload, I would like to put a link on _list.rhtml of my
document to edit the upload of the same id.
I tried something like <%= link_to ''Edit'', {:controller => upload,
:action => ''edit'', :id => document} %> but obviously that''s wrong. Any
idea how to make it right?
2006 May 13
1
how to close the window on def update?
hey all,
I have my usual update function like this:
def update
@document = Document.find(params[:id])
if @document.update_attributes(params[:document])
flash[:notice] = ''Document was successfully updated.''
redirect_to :action => ''show''
else
render :action => ''edit''
end
end
I would like to change:
2007 May 23
2
issues with searching custom fields
Hey all,
I''m using acts_as_ferret this way:
class Job < ActiveRecord::Base
acts_as_ferret :fields => [:title, :workers_name]
def workers_name
return self.workers.inject("") {|names,b| names + " " + b.first_name}.to_s
end
end
But when I do Job.find_by_contents("workers_name:patrick")
I get nil.
Yet when I do:
j=Job.find :first
j.workers_name
I do
2007 May 25
1
how to update index with acts_as_ferret?
Hey all,
I have movie has_many :medias and media belongs_to :media
this is how my movie class looks like:
class Movie < ActiveRecord::Base
has_many :medias
acts_as_ferret :fields => [:title,:medias_name]
def medias_name
return self.medias.inject("") {|name,m| name + " " + m.name}
end
end
when I do Movie.find_by_contents("title:bob") it does return a movie
2006 Nov 13
1
rails+apache2+mongrel_cluster
hey all,
I managed to configure a mongrel+apache2 but now I would like to do a
mongrel_cluster. For now I have a sites-available/myapp but when it
comes to mongrel_cluster I need to set up myapp.common,
myapp.proxy_cluster.conf and
myapp.proxy_frontend.conf and I couldn''t find a tutorial that explain
where should those file go. is it in conf.d or sites-available/ or
else?
thanx in
2007 Nov 10
2
FireFox builds with support for OGG Theora / SVG+Video
Although this is old news actually, for those who are interested there
are precompiled builds of FireFox 3 with support for streaming OGG
Theora in SVG SMIL. Good news for those who just want to see it work
without having to patch and compile from GIT.
http://www.double.co.nz/video_test/
And for those who just want to see it work without downloading anything: