RailsCasts Pro episodes are now free!

Learn more or hide this

doadmin's Profile

GitHub User: cortodev

Site: www.dauphineonair.com

Comments by doadmin

Avatar

This episode is great. There is something weird however : the class authentication is calling authenticate on the user class. I think password authentication should be handle by the authentication class

Avatar

Why don't you use the find or create syntax in the product model instead of doing find || new ?

Avatar

You can also use g Raphael which is the library Raphael provides for drawing charts

Avatar

Yes it definitively worth waiting. Note that's there is torquebox casts : http://torquebox.org/podcasts/

Avatar

+1 for torquebox though I think it's a pretty big tool and should be reserve for big projects with private server

Avatar

Where do you set the ENV variable ?

Avatar

Is there a way to completely get rid of active record and sqlite gem?

edit:

''' bash
rails new appli --skip-active-record
'''

Avatar

Great tuto ! Useful for everythin. Thanks
Please note that it should be :

bash
if [[ -f Rakefile ]];then
#....
fi

and not

bash
if [[ -f Rakefile]];then
#....
fi
Avatar

Really great. I customize it to use the new html5 and have an autocompletion on association without javascript.

ruby
class SimpleFormBuilder < ActionView::Helpers::FormBuilder
#...
  def text_field_with_list(name, *args)
    options = args.extract_options!
    options[:list] ||= options[:label].downcase.pluralize
    t = content_tag :datalist, options[:datalist].collect{ |option| content_tag(:option, option) }.join.html_safe, :id => options[:list] if options[:datalist].is_a? Enumerable
    text_field(name, options) + t
  end

  def objectify_options(options)
    super.except(:label, :datalist)
  end
end
ruby
<%=f.text_field_with_list :pseudo_auteur, :label => "Auteur", :datalist => Auteur.pluck(:pseudo)%>