Displaying 20 results from an estimated 4000 matches similar to: "Working with css"
2006 Jun 21
1
Plugin Panic! - no accessing a model''s class methods?
Hi plugin-authors.
So this is a little bit of take two on this question, but why can''t I
access a singleton on the model calling my plugin? The crux of the full
plugin below is:
#logger.info self.class.to_s
new_copy = self.class.new( @copyable_attributes )
the logger spits out "Datatype", but I get an error from rails saying:
undefined method `datatype'' for
2005 Dec 22
3
acts_as_stateless ?
Is there such a thing that I could use to store sessions in the DB
instead of in a cookie so that I can ensure users will be able to
access their session data even across several load balancers? We use
totally stateless machines here at work and I am worried about
deploying a rails app in production that uses a volitile session
stored on the machine.
Any help is great!
Happy Holidays,
Mark
--
2006 Apr 03
5
Is old school STI broken? How would you do the same now?
So this new STI :through thing is still not clear to me. I have a
project now where I''m using this:
class List < ActiveRecord::Base
belongs_to :user
end
class StaticList < List
has_and_belongs_to_many :items
end
In the script/console:
>> StaticList.create
NameError: uninitialized constant StaticList
What? ok, fine. So a List.create would be in
2006 Jan 10
6
print an instance variable?
Is there a way to print out an instance variable (@something) so you can
see:
1: what it contains
2: how it''s mapped together
??
--
Posted via http://www.ruby-forum.com/.
2006 Apr 03
2
HABTM migrations
Bad rails day for Matt-
In a migration, for a habtm:
create_table :teams_users do |t|
t.column :team_id, :integer
t.column :user_id, :integer
end
Ok, fine. In a controller (well really a migration script):
@user.teams << Team.find( 3 )
And the SQL pumped at my server is:
INSERT INTO teams_users (`team_id`, `id`, `user_id`) VALUES (3, 3, 34)
Which
2006 Apr 07
2
MSSQL activerecord uses bad syntax
Hi all,
I''m trying to get rails up on mssql for a friend, does anyone have
experience? We''re working on a Windows XP box with MSSQL 2000 (no
service pak), and both rails (1.1) and MSSQL are on the same box. I''m
running into a bug (I think) where activerecord is using this syntax:
SELECT TOP 1 * FROM users WHERE (users.user = ''jbgnuumnbu'')
2006 Apr 03
4
STI Broken on 1.1
Yeah I''m getting major problems as well. I don''t know what the issue is but
I''m thinking of going back to 1.0
I would really like to hear if you figure this out, kind of an important
part of Rails for us.
-Paul
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
2005 Dec 21
2
what is print_r in rails
hey,
i know u have in php print_r or echo, so that the browser print the variable on
top of page, no matter what
what is this in rails?? put doesnt seem to work
Thanks
Nick
2006 Aug 18
3
equivalent of "puts" in rhtml
Hi everyone,
This seems so basic, and yet I can''t quite figure it out.
Say I have some code in an .rhtml document:
<%=
if @session[:user_id]
link_to somethingA
else
link_to somethingB
link_to somethingC
end
-%>
Only the link to somethingC will show in the second case. I understand
that the last thing returned from that else block is that last line. In
php i could just add
2006 May 19
2
Help with using method_missing to create template path
I have a site (for an academic conference) that I want to convert to RoR
- both as a learning exercise and to ease further updates and
development. There are a number of child pages for each conference (past
and future), but these pages are different for each conference (not same
child pages for each conference). The URLs are along the lines of:
/conference/2000/keynotes
2009 Aug 13
6
Strange Routing
Hi Guys,
I have some strangeness with routing, using standard route
map.connect '':controller/:action/:id''
map.connect '':controller/:action/:id.:format''
Using console I did
>> rts = ActionController::Routing::Routes
>> rts.generate(:action => "edit", :controller => ''vendorlocations'', :id => 10)
=>
2006 Jan 10
3
ROR setup problems with Suse + apache
hello,
I am tying to run ROR on apache 2 with suse linux 9.3,
and I do not succeed with it.
I set rubby und rails and all scripts are running fine.
my Document root :
/srv/rails/demo/public
I did not setup FastCGI because I could not run it with
normal CGI jet.
my Virtual Server runs on 192.168.0.111
ServerName rails
DocumentRoot /srv/rails/demo/public
<Directory
2005 Dec 23
8
webrick / winxp won''t stop serving cached file??
Hi
Working through the tut material in teh PP book (agile dev with rails)
on a laptop running winxp.
Creating the "admin" application, things generally work great. Except:
at teh end of chapter 6, when we update teh css to improve the look of
the page - I copy the new scaffold.css into my working directory, but
webrick keeps serving the old css, even after a restart. Very odd. The
2006 Jun 05
3
How to get dd mmm and yyyy from dd-mmm-yyyy
The input values could be something like this:
01-Dec-2006
01-December-2006
1-June-2006
Is there an easy to way to get the three variables populated dd, mmm and
yyyy for any of the above input values? I tried to look at regex but couldn''
anything simple.
Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
2005 Dec 19
7
How about a forked session supervisor in dispatch.fcgi?
I was talking to a friend of mine who''s developing PHP on trax and we
came up with a solution to the ruby session file problem. I''m not
sure if this idea has come up before, so I wanted to run it by
everyone before making any code contributations and/or talking to the
Rails core about it.
It seems to me that the current situation we''re in with regard to
2005 Dec 21
4
[OT] server partitioning question (rails + postgres)
Hi,
A bit off-topic, but I''m about to set up a remote Linux server
for Rails, with postgres and probably Lighttpd.
The server has two 120GB hard drives, one of which will just be
for nightly backups of the other.
I don''t intend to have any untrusted user accounts on the server.
The server will be dedicated to my own applications.
I''ll want to support lots of www
2006 Jun 05
1
Form Field
I''m trying to get the value of a form field (input type="text"
id="name">) from a controller via the params hash, but this isn''t
working. I thought params[:name] would return this. The textbox is not
part of the model.
Does anyone know how to do this??
Thanks!
--
Posted via http://www.ruby-forum.com/.
2006 Apr 03
1
why ruby GC can take only 8 meg of memory????
Hi,
As I understand, the GC of Ruby can take only max. 8
meg of memory. So I wonder if there is some reason
behide this or it is simply a hardecode feature????
and if I want to increase the memeory, how should I do
this???
Thanks you very much!!!!
Saiho
The mind is its own place, and in itself.
Can make a Heaven of Hell, a Hell of Heaven.
http://www.geocities.com/sayoyo/
2006 Apr 20
1
error on stpexec : ROR on Linux with SQLServer Connection
So I got my rails app to connect to the SQLServer via ODBC, and I can
model/scaffold, yada yada..
but when I need to exec a stored proc using sql_server.rb I get
undefined local variable or method `connection''
how can that be, if I can connect for everthing else?
thanks
--
Posted via http://www.ruby-forum.com/.
2006 Jun 21
11
executive: "is rails secure?"
Yesterday, I was doing a dog-and-pony for the head of the company that
I work for.
He asked, "Is this (a rails application) secure?"
I said, "It''s as secure as anything else on the web is," and proceeded
to talk about how the data was protected, how we weren''t saving
anything that''s worth protecting, and so on.
I''d like to have a better