Re: [Rails] String to String?

2010-01-13 Thread srinivasan sakthivel
u can try this @re = this.gsub(this,'this') puts @re Thanks seenu On Wed, Jan 13, 2010 at 12:47 PM, Conrad Taylor conra...@gmail.com wrote: On Tue, Jan 12, 2010 at 11:11 PM, joshmc...@gmail.com joshmc...@gmail.com wrote: Really basic question. How can I convert this to 'this'

[Rails] Re: form_tag wih two Button

2009-10-30 Thread srinivasan sakthivel
Hi U can try this Controller: def new if params[:save] @val = Product.new(params[:product]) @val.save @flash[:notice]=Supplier successfully created. end if params[:check] @users = Product.find(params[:id]) @users.update_attributes(params[:product]) @flash[:notice]=Supplier has been updated

[Rails] Re: How to send a html email with attachment

2009-10-29 Thread srinivasan sakthivel
Hi U can try this. User_notifier: def method_name(email) @recipients = email @content_type = text/html attachment :content_type = application/octet-stream, :filename = User Manual.pdf, :body = File.read(public/User Manual.pdf) end Thanks

[Rails] Re: Help Plzz (new to ruby)

2009-10-26 Thread srinivasan sakthivel
Hi Antony, For Example: erb.file.U have 3 three fields. username,useremail then useraddress in the user tables. Table Name:users In controller def create @user =User.new(params[:user]) @user.save redirect_to :action ='list' end Otherwise u can try this one: def create @user =User.new()

[Rails] Re: undefined method `stringify_keys!' for :String

2009-10-22 Thread srinivasan sakthivel
hi Give me ur controller code. thanks seenu On Thu, Oct 22, 2009 at 1:54 PM, Ralu rm rails-mailing-l...@andreas-s.netwrote: i have an error undefined method `stringify_keys!' for :String my view is given below %= form_tag :action = 'resolve_create', :resolve = @resolve %

[Rails] Re: undefined method `stringify_keys!' for :String

2009-10-22 Thread srinivasan sakthivel
: srinivasan sakthivel wrote: hi Give me ur controller code. thanks seenu On Thu, Oct 22, 2009 at 1:54 PM, Ralu rm def update @ticket = Ticket.find(params[:id]) if @ticket.update_attributes(params[:ticket]) redirect_to :action = 'list' else redirect_to

[Rails] Re: undefined method `stringify_keys!' for :String

2009-10-22 Thread srinivasan sakthivel
Otherwise u can try this one def resolve_create @resolve = Resolve.new() @resolve.content = params[:resolve][:content] if @resolve.save redirect_to :action = 'list' else render :action = 'resolve' end end Thanks seenu On Thu, Oct 22, 2009 at 2:36 PM, srinivasan sakthivel seenusss2

[Rails] Re: Find sub sub records

2009-10-20 Thread srinivasan sakthivel
Hi friend u can try this one..There are three tables :Library,Author,book Class Library ActiveRecord::Base has_many :Authors has_many :Books end Class Author ActiveRecord::Base belongs_to :library has_many :books end Class Book ActiveRecord::Base belongs_to :library belongs_to :author end On

[Rails] Re: We're sorry, but something went wrong on Tomcat

2009-10-19 Thread srinivasan sakthivel
Hi First check ur database and then give previliage in ur application. Thanks On Mon, Oct 19, 2009 at 2:36 PM, rtacconi rtacc...@gmail.com wrote: The problem is that form that server I cannot connect to the MSql server, so the error is, no DB connection. Ii there a way to test the DB

[Rails] Re: empty parameter submitted but .nil failed to detect it

2009-10-13 Thread srinivasan sakthivel
Hi friend, U can try this, if params[:catergory] != nil On Tue, Oct 13, 2009 at 5:41 PM, Colin Law clan...@googlemail.com wrote: 2009/10/13 ct9a anexi...@gmail.com: hi guys i have a form which has an element, category id. When i submit it with values, i can see