Archive

Posts Tagged ‘rails’

Rails Best Practises

Today when I’m browsing through some rails stuff I found this very helpful resource on best practices in rails development by ihower

http://www.slideshare.net/ihower/rails-best-practices

enjoy

Advertisements
Categories: Uncategorized Tags: ,

Net::SMTPSyntaxError (501 : missing or malformed local part )

December 1, 2009 Leave a comment

If you are on Rails and tried to send a mail from ActionMailer, you might have got this error, Recently I did,

With  a little bit of googling I came across the solution,  This mostly happens because of the sending recipients,

Mostly you have mistyped the e-mail address (es),  In my case, my recipients list was like this

email1@google.com, email2.yahoo.com,

and the last ‘,’ had caused the problem, So I changed it to

email1@google.com, email2.yahoo.com

and everything was back to normal

Following links are also useful to have a look

http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/62e0bafc916a46a6/b0b672c0db4974b9?lnk=raot&pli=1

http://www.ruby-forum.com/topic/79053

 

 

 

 

 

 

 

 

 

Categories: 1 Tags: ,

Passing parameters to a partial

August 19, 2009 2 comments

Hi,

This is just a quick post about how to pass parameters to rails partials. (As most of you all know, partials are lightweight than components) and personally I’m using it in my project as headers and footers.

But if we are to pass some parameters to the partial how to do that ?? its simple as this

render :partial => “<partial name>”, :locals => { :param1 => “value”}

<partial name> – name of your partial (Ex /partials/footer)

:params1 – parameter name

“value” – value

Its quick and simple 🙂


Categories: Ruby Rails Tags: , ,

render_component plugin and rails 2.3

August 7, 2009 5 comments

OK, since Rails 2.3 has depriciated the render_component method and advising to use a plugin for that I went and downloaded the plugin from

http://github.com/rails/render_component/tree/master but ended up being getting this error..

/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/core_ext/module/aliasing.rb:33:in `alias_method’: undefined method `set_session_options’ for class `ActionController::Base’ (NameError)

🙂

Ok… Now what… After doing some googling finally I found a fix to that…. Use this git

script/plugin install 
git://github.com/lackac/render_component.git -r rails-edge 

and that fixed my issue... hope yours as well :)

and thanks for this link —

http://www.42.mach7x.com/2009/06/24/undefined-method-render_component-with-activescaffold-and-rails-2-3-2/