Displaying 20 results from an estimated 10000 matches similar to: "periodic email"
2005 Dec 28
2
form reset after successful form submission
hi,
what''s the way to reset the form generated by the form_remote_tag
after the successful submission of the form?
thanks
2005 Dec 15
10
.rpdf ?
I haven''t delved into the wonderful world of PDF::Writer yet, nor have I
run across a need.. but I just had an idea I wanted to throw out there
how hard would it be to create a .rpdf template plugin for rails?
could be neat ;]
2005 Dec 25
2
scriptaculous-js-1.5.0
I''m not a JavaScript guy, so please help me out.
It''s my understanding that Rails 1.0 includes scriptaculous-js-1.5.0
But it seems to contain portions of, but not the complete library.
Rails 1.0 includes 4 .js files, scriptaculous-js-1.5.0 includes 8.
What am I missing?
> tmornini$ rails --version
> Rails 1.0.0
>
> tmornini$ rails test | grep
2005 Mar 06
3
Accessing login name from login_generator
I''m new to Rails and am modifying the ToDo tutorial app into something
else. I have successfully installed authentication via login_generator
and now I working toward restricting access to certain database records
based on the login name. I realize that eventually, I''ll want to use
the "id" field, but for now, I just want to use the user name itself.
I have
2005 Dec 16
3
Using :include "recursively" (including the children of the child)?
Hi,
Let''s say I have the following hierarchy of tables:
Group <- parent
Location <- child of Group
School <- child of Location
Phone <- child of School
Then, if I want to do this:
Location.find(...someparms..., :include => [:schools, :group, :phones])
I get an association error (Association was not found). I guess it
happens because AR is looking in the Location model
2005 Dec 14
4
find_by_ issue
In the Agile RoR book, page 219 (softcover version) they talk about the
fact you can use the methods: find_by_ and find_all_by_ and fill in the
last piece with a valid column name.
So I have a database table called "parts" and the following columns:
id
partname
partnumber
vendor
I do the following:
(connection to DB already established)
class Part < ActiveRecord::Base
end
2005 Dec 18
3
Render Nothing....
Hi,
What''s the best way to render nothing ? I am making an ajax call to
an action on my controller that does not need to make any changes to the
view.
Not sure how do that yet as I get an exception in the logs saying
xxx.rhtml not found....
Thank you all !!
--
Posted via http://www.ruby-forum.com/.
2005 Dec 18
2
EdgeRails with other Gems like RMagick
I am using EdgeRails, and have some of the plugin''s using gems such as
Rmagick which are included through a command similar to "require_gems
''rmagick''".
Curious how to handle such attempts at inclusion when I am no longer bound
to the system gems and am using the code strictly within vendor/rails and
such.
Is there a way to point require_gems to another
2005 Dec 19
1
Application.rb / Application_Helper.rb / DRY help
Hi all,
I have defined the following method in both application.rb and
application_helper.rb:
def still_logged_in?
!session[:user_id].nil?
end
This method is called in a before_filter in my application.rb, as well
as in my layout/application.rhtml and view/user/login.rhtml (for
showing a login / logout button, etc.)
I had to put it both places, otherwise I would get an
2005 Dec 20
2
Modifying data before update or save
Hi,
I''d like to upcase a variable before it is saved, but I''m not sure how
to access the incoming param or where this work should be performed:
In my update method, I have:
@device = Device.find(params[:id])
params[:device[macaddress]].upcase <-- problem code
if @device.update_attributes(params[:device])
....usual stuff here
''macaddress'' is the
2005 Dec 22
2
Accessing an instance variable by its name (as a string)
Hi (again!)
I have a function which gets passed the name of an instance variable,
and spits its out all nicely formatted.
Just wondering, how do i access the variable, when all i have is its
name stored as a string?
So far i''ve got this code, but it looks horrible. Is there a better way?
eval("@" << inst_var_name << "." << field_name <<
2005 Dec 27
1
Debugging Migrations
I''m having a heck of a time trying to debug issues in my migrations.
First, is there a good way to do this? Second, is there a way to get any
output to test it?
_______________________
Brad Eck
_______________________________________________
Rails mailing list
Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
http://lists.rubyonrails.org/mailman/listinfo/rails
2005 Dec 23
1
Better way to import initial migration?
On a rails app that I''m developing I converted a regular old .sql file
into a rails migration. Since I generated the migration in my
development environment, it created the schema_info table for me.
However, when I updated my production environment and tried running
rake migrate it complained that schema_info doesn''t exist. Is there a
rake task for getting around this yet, or
2005 Dec 18
2
Rake Test Output Prettifier
Watching the test results scroll by, it occurred to me that there must
be an easier way than either letting it go or capturing it to a log file
to mess with in TextMate.
Here''s my first stab at an HTMLifier for test output. Just download,
unzip, chmod +x, and you can:
rake | ./prake.rb
Which, if you are on a Mac, should bring up a Safari window with a
summary of the problems at the
2005 Dec 22
4
Is "case" a magic name
I''m a newbie.
My first app is using a table called cases. With just "scaffold
:case" I get the basic list to show up.
I just did a "generate scaffold case case" (I think that is correct).
Now when I try to list my cases, I''m getting a syntax error on all of
the view source code that references "case".
ie. <% for case in @cases %>
Thanks
2005 Dec 22
2
Documentation for generate controller
I can find the API documentation, but where is the documentation for the
standard generators. The wiki has 3rd party generators- but I want to
know specifically what generate controller does, and how it differs from
generate scaffold, and what other generators there are.
Where is this succinctly documented?
--
Posted via http://www.ruby-forum.com/.
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
--
2005 Mar 02
9
date validation
I''m hoping someone can help me (a Rails newbie) with this. Basically, I
need to verify that a date created with "date_select" is valid *before*
it''s sent off to the database for acceptance (as a valid date) or
rejection (as an invalid date). Given how easy the majority of validation
are in Rails, I''ve got to believe there''s a fairly simple way
2005 Mar 10
8
Login controller additions
I have added roles and roles_users table and updated the model so that
my users can have multiple roles.
("Admin" role does always have id = 1).
I have added these methods to my application controller.
<code>
helper_method :is_admin?
helper_method :is_user?
def is_admin?
if @session[''user'']
@session[''user''].roles.find(1)
2007 Jan 23
3
Too many session numbers per page request?
If I view the source on one of my pages I see:
<script src="/javascripts/prototype.js?1168898271"
type="text/javascript"></script>
<script src="/javascripts/effects.js?1169242655"
type="text/javascript"></script>
<script src="/javascripts/dragdrop.js?1169241657"
type="text/javascript"></script>