similar to: Which is faster, calling helpers or rendering a partial?

Displaying 20 results from an estimated 6000 matches similar to: "Which is faster, calling helpers or rendering a partial?"

2006 Feb 17
3
Switchtower (0.10.0), ssh and environment confusion
Seems like my day for Rails posts... :) OK. I''ve started using Swtichtower to help with deploying changes to my production rails apps. Unfortunately I''ve come accros an inconsistency that I can''t quite figure out. It''s about the PATH env var under Bash. I''ve created a task that just does a: run "env", to show what I''m seeing:
2005 Jul 06
4
Bug in shop demo
http://script.aculo.us/demos/shop if you drag an item from the product list straight to the droppable area to remove an item from the cart, it''ll still add it to the cart. -PJ
2006 Jan 21
9
Where to put method
I''ve got following code in GenresHelper.rb def album_list(genre) albums = genre.albums.sort list = albums.collect { |album| link = link_to album.title, :controller => ''albums'', :action => ''show'',
2006 Jan 17
2
Getting data back from thread spawn
I have a script that needs to be run, that in some cases will take longer than the server timeout. So, I''m thinking just throw the script in its own thread, but I need to be able to get the data back from that thread and refresh the page with the data returned. Any suggestions how to do this? Thanks, PJ
2006 Apr 28
4
Conditional in Model
Hello ~ Is there a way to determine within a model which controller/action instantiated the model? Thx, -- Ben Reubenstein http://www.benr75.com
2006 Jun 07
9
lighttpd/fastcgi - where does stdout go?
i''m using lighty and fastcgi in my rails production environment. standard output appears to get swallowed up somewhere... it''s clearly not coming out of the development log. don''t know where to look for it. is this a byproduct of running in production mode? is there a way to turn this off? thanks, paul
2006 May 05
1
Help with ActiveRecord
Model: class AdminQueue < ActiveRecord::Base set_table_name ''adminqueue'' end Interacting with it in script/console >> AdminQueue.new => #<AdminQueue:0x240a910 @attributes={"topic_id"=>nil, "resolved"=>nil, "updated_on"=>nil, "action"=>nil, "type"=>nil, "post_id"=>nil,
2006 May 23
7
has_and_belongs_to_many question
Hello, I am trying to make the "switchover" to programming my apps in Rails and have a question about database structure. In the past i would structure a many to many like this: categories ---------------------------------------------------- | id | name | ---------------------------------------------------- 1 Some Category 2 Another
2005 Jun 24
9
new mysql gem
Hi everyone, For those who have/had problems with Webrick not properly closing MySQL connections, there is a new MySQL gem. (Actually the version was released some time ago, just nobody took the time to make a gem) So run "gem update" or just "gem install mysql" to update (not sure if the latter also updates). Special thanks to Tobias Luetke, who forwarded the gem to Chad
2006 Apr 26
1
Possible acts_as_authenticated bug (or rails)
The code that comes with the plugin uses a method that looks like this: def password_required? crypted_password.blank? or not password.blank? end with validations that look like this: validates_presence_of :password, :if => :password_required? validates_presence_of :password_confirmation, :if => :password_required? validates_length_of
2006 May 28
14
Lightbox and RJS
Hi, I am trying to include lightbox functionality in my app, but there is a slight complication. Apparently lightbox initializes all the links to lightbox events on page load. However, in my case, some new links to lightbox events will be rendered to the page through ajax events (obviously this means after the page loads). So I figure I need to find a way to call lightbox''s
2006 May 02
9
Updating only one field
At present, I use an update like this to set the user''s last login time: authenticated_user.update_attribute(:last_login, Time.now) However, this calls the following, updating all fields: UPDATE users SET `last_login` = ''2006-05-02 13:27:41'', `hashed_password` = .... Is there any way I can tell ActionRecord to only update the one field? I don''t really want
2006 Apr 29
10
A Good Tutorial on Params and Variables
I have found various posts about instance variables, session variables and parameters (each of which seems to use differnet syntax and have different view on the "best practice") I would like to find a single, reliable source that provides a good overview on all of it. Specifically, I would like to learn how to pass parameters between controllers and how to set session variables so
2006 May 08
1
Rails workshops/training in the Upper Valley
Hey, everyone. Wanted to post this announcement to the list. This is for a series of workshops that myself and my business partner are putting on. For those that live in the Northern New England area, looking to get some good hands-on instruction into Rails, this might be for you. Oh.. and don''t be too freaked out by my picture on the front page. I''ve got a fairly
2006 May 16
2
Model layer access control
I already have a simple role based access control system (User, Role, Privilege, Client) in place for my web layer, which checks User.authorized?(controller, action, client) from a before filter. What do you think about using this method for auth checks on the model layer as well, only with made up controller/action strings? (e.g. "model::Period", "close") A bit simplistic
2006 May 28
3
Experience with RSpec
Anyone with experience with RSpec care to share? Thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060528/29c9ba64/attachment.html
2006 May 08
2
Documentation for rails
I''m trying to convince a co-founder of the startup I''m working on that rails is the new black, or possibly the next sliced bread. Does rails ship with doc, or the API? I can''t even figure out how to download it from api.rubyonrails.com, or if that''s possible. When I look in C:\ruby\lib\ruby\gems\1.8\gems\rails-1.1.2\doc I see nothing of use. I have to admit
2006 Jun 05
2
Simple Rake question
Newbie question but here goes: Isn''t rake supposed to automatically search the lib/tasks subdirectory for Rake files/tasks? I have a task called "do_this.rake" in file foo.rake in lib/tasks/rails - how do I invoke it from the command line in the root directory of my Rails application? Presuming I have a file called "Rakefile" in the root directory of my Rails
2005 Oct 21
21
PHPonRails ?
I''ve have a very tight schedule project that MUST (not my option), be developed in PHP. Is there a Rails based framework for this platform? I like the Rails way of things, but in this case, I cannot choose the programming language, so please don''t offend me :-) Thanks in advance, Alessandro _______________________________________________ Rails mailing list
2006 May 12
6
How to truly separate Logic from view with Rails?
It is something that I have been wondering. When working with other application servers there is often/most of the time a 3 tiers/layers architecture: - Presentation layer/Web services - Application layer - Database layer They often resides on separate machines, 3 different sets. So the application code is logically AND physically separated from the presentation layer. Is this possible with