[Rails] Re: I'm feeling stupid -- about getting MySQL to start up

2013-06-08 Thread Alberto Grespan
try typing: $ brew info mysql this is some of the info that shows up. To connect: mysql -uroot To have launchd start mysql at login: ln -sfv /usr/local/opt/mysql/*.plist ~/Library/LaunchAgents Then to load mysql now: launchctl load ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist

[Rails] Why can't get remote javascript libraries on Rails 4

2013-05-29 Thread Alberto Pat Martínez
In rails 3, I included this line: *%= javascript_include_tag http://cdn.leafletjs.com/leaflet-0.5.1/leaflet.js; %* But when migrate to rails 4, its not posible and I get the next error: *Invalid argument - C:/Ruby193/findiner/app/assets/javascripts/http://cdn.leafletjs.com/leaflet-0.5.1 * So

[Rails] [Ajax] link_to remote with method POST or DELETE

2011-03-06 Thread Alberto Santini
Hi! I'm developing a test application, just to experiment a little bit with ajax. Right now I only have a Company model with the attributes name:string, description:text and voted:boolean. What I'm trying to do is: in company#index show a vote link to vote a company; after the company has been

[Rails] Re: Update div with Prototype

2010-12-01 Thread Alberto B.
Hello Guest, This is my full code, I want to update datos, without the :remote = true the div is updated but the full page, and it does nothing. application.html.erb !DOCTYPE html html head title%= title %/title %= csrf_meta_tag % %= render 'layouts/stylesheets' % %=

[Rails] Re: Update div with Prototype

2010-12-01 Thread Alberto B.
The title variable is to change the title when the page is refreshed. What you're doing with link_to_remote is what I want it. The problem is that Rails 3 does not work the remote = true in the link_.to and is supposed to be the equivalent of link_to_remote in Rails 2. And if I remove the

[Rails] Re: Update div with Prototype

2010-12-01 Thread Alberto B.
I want to update the div (datos), the title works well. I don't know why the option remote = true does not works. A greeting. Thanks. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to

[Rails] Update div with Prototype

2010-11-30 Thread Alberto B.
I want to update a div on my page with prototype (new Ajax.Updater ('my_div', 'page.html')). What I do is: . . % = csrf_meta_tag% % = javascript_include_tag: defaults% . . % = yield% . . % = link_to Link, page_path,: remote = true% Without the :remote = true the div is updated but it does

[Rails] Edit only your posts

2010-01-10 Thread Alberto Lopez
Hello, How can I do, when a user make a post, he only can edit his posts? thanks -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to

[Rails] Re: Edit only your posts

2010-01-10 Thread Alberto Lopez
Leonardo Mateo wrote: On Sun, Jan 10, 2010 at 11:30 AM, Alberto Lopez li...@ruby-forum.com wrote: Hello, How can I do, when a user make a post, he only can edit his posts? Check for the owner of the post on the edit action? Exactly, if you have an user on my website an post anything, you

[Rails] Re: Re: Edit only your posts

2010-01-10 Thread Alberto Lopez
Colin Law wrote: 2010/1/10 Alberto Lopez li...@ruby-forum.com: Leonardo Mateo wrote: On Sun, Jan 10, 2010 at 11:30 AM, Alberto Lopez li...@ruby-forum.com wrote: Hello, How can I do, when a user make a post, he only can edit his posts? Check for the owner of the post on the edit action

[Rails] union of two forms in one

2010-01-02 Thread Alberto Lopez
Hello, I have two forms. One of them is for keep the info in BBDD, and the other is to pay in PayPal. In my store I have in tienda_controller.rb an action to checkout. It redirect you to checkout1.html.erb #views/tienda/checkout1.html.erb h1PASO 1/h1 %= error_messages_for 'pedido' % %

[Rails] Re: rails: command not found on Debian lenny

2009-10-06 Thread Alberto Furia
kitty00 wrote: I installed ruby gems from their website ?! Not from debian official repos? After I installed gems. I had to create a symbolic link otherwise gem command wouldn't work. type this on the shell prompt (single line): echo 'export PATH=/var/lib/gems/1.8/bin:$PATH' ~/.bashrc ;

[Rails] auto_complete div remains hidden

2009-07-29 Thread Alberto Santini
Hi! I'm using Pat Shaughnessy's auto_complete fork, working with nested forms. It's working very well, producing the right auto complete query and filling up the auto-complete div (as I can see from firebug). Just, the div has a style=display: none; property always set that's preventing it from

[Rails] Re: Swfobject rails 2.3.2 - get session vars

2009-07-22 Thread Alberto Ruffo
up -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-talk@googlegroups.com To unsubscribe from

[Rails] Swfobject rails 2.3.2 - get session vars

2009-07-21 Thread Alberto Ruffo
: upload_url : '%= swfupload_documents_path %?_Docs_session=%= request.session_options[:id] %authenticity_token=%= form_authenticity_token %', and in DocumentsController, there is: protect_from_forgery :except = :swfupload can anyone help me please? Thank you very much. Regards Alberto -- Posted via

[Rails] Hash#merge in a controller

2009-05-09 Thread Alberto Santini
Hi all! I have a Place model with a description attribute and a Service model with an itinerary attribute. An itinerary is simply a string with dash-seprated place descriptions. In my services_controller.rb#create i have the following code: itinerary =

[Rails] Re: Hash#merge in a controller

2009-05-09 Thread Alberto Santini
Mistery solved: that wasn't an Hash, but an HashWithIndifferentAccess, which #merge method doesn't accept any block :-) A .to_hash was sufficient :-) -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are

[Rails] Re: Reg Expression Help Please?

2009-04-29 Thread alberto
The body is a text column in which people can add text and HTML. If this is the use case, then you want to protect what the user enters. Using RedCloth or other markup library might do a better job of what you are trying to achieve. --~--~-~--~~~---~--~~ You

[Rails] Re: strategies for securing attachment files from unwanted access

2009-04-07 Thread Alberto Perdomo
That but use X-Sendfile or X-accel-redirect: this makes apache/nginx send the file, rather than funnelling it through ruby. All your rails controller does (assuming the person is  authorized) is set a header in the response saying 'send them this file') How does X-Sendfile behave when turned

[Rails] Re: Login chooses database

2009-03-28 Thread alberto
I just finishes my first RoR application Good for you. And now someone else wants to use it, even better! As to how to do this, one reliable way to do this is to use version control and capistrano. version control If you have not added your code base to a version control repository, now is

[Rails] Re: populating database outside of applicaiton

2009-03-22 Thread alberto
You can use a background process that runs independently of your web listeners. You can use something like Background DRB or some other background daemon. From there you can call any of your methods in your application to populate the appropriate tables.

[Rails] Re: Rails requires RubyGems = 1.3.1 (you have 1.1.1) on OSX

2009-03-20 Thread alberto
has you tried sudo gem install rubygems-update sudo update_rubygems --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-talk@googlegroups.com

[Rails] lightly used mongrel process - mysql connection

2009-03-19 Thread alberto
I noticed that in one of my apps that are lightly used, we had a background process that would only contact the DB if some condition was met. If not, it would not contact the DB. It could go for days without establishing a connection to the DB. And then, when it was finally time, the process

[Rails] Re: xmlsimple warning

2009-02-27 Thread Alberto
Thanks people! The script worked me just fine! On Jan 20, 9:49 pm, ginty itsgi...@gmail.com wrote: Outstanding thanks for the replies guys! Phil your script fixed it for me, cheers! On Nov 29 2008, 2:58 am, PhilW p...@slightly-cracked.com wrote: On Nov 11, 5:29 am, Mathematician

[Rails] Re: Hook Exist in Rails for System-Wide Exception Logging?

2009-02-15 Thread alberto
Rails Exception Notifier will give you what you need. If you want, you can hook into it a write to the DB, but you will find that the email notification is plenty. http://github.com/rails/exception_notification/tree/master --~--~-~--~~~---~--~~ You received this

[Rails] Re: Serverside chart generator

2009-02-09 Thread alberto
ziya gives you great looking swf graphs. Instructions to install the gem and samples: http://ziya.liquidrail.com/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group,

[Rails] Re: logic for a search method

2009-02-08 Thread alberto
the params in the Controller is a method that returns the hash coming to the request. So you can pass the whole params method in the call. @schools = School.search(params) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

[Rails] Re: logic for a search method

2009-02-07 Thread alberto
A couple of things: 1) You want to make sure you protect against SLQ injection, so do not pass the variables without escaping them. Rails does this for you when it substitutes the ? in the find method. 2) You can use the code below to do what you want. Hope that helps, Alberto

[Rails] Re: application helper problema

2009-02-07 Thread alberto
On Feb 7, 1:28 pm, Me chabg...@gmail.com wrote: OK, so you can only call functions in a controller that are in a model? You can call methods from pretty much anywhere, but that is not the point. In Rails, you want to follow their MVC pattern to get the most of the framework.You want to call

[Rails] Re: get # of errors in error_messages_for

2009-02-05 Thread alberto
On Feb 5, 1:26 am, Johnroy World rails-mailing-l...@andreas-s.net wrote: error_messages_for :user, :header_message = 'X errors, please find red mark', :message = 'Following errors were found:' @user.errors.full_messages that will return an array of the text messages. So you can do

[Rails] Re: ActiveRecord: Least surprise? Really?

2009-01-27 Thread alberto
When I create a has_many association, I would expect a fact table parent_child to be created (with id, parent_id, and child_id columns), and if I wanted a two-way relationship, I would add belongs_to to the Child. I think you are getting your associations mixed up. In addition to the

[Rails] Re: Creating records with file upload in migration

2009-01-27 Thread alberto
I have a migration which creates several records along with the table. eg Forum.create :title = General Discussion, :description = General Chit-Chat I am not sure you want to combine migrations with record creation. It is probably best for you to handle this via a load script or a rake task.

[Rails] Re: How to share tables between Ruby Apps...

2009-01-27 Thread alberto
How can we share this table(email details) across several Ruby apps? Sharing a table is straight forward. If they are in the same database, you simply call the class methods for this utility functionality. If the table exists in another database, you add that database to the database.yml file.

[Rails] Re: request.env variables in an observer

2009-01-27 Thread alberto
I have a scenario were I would like to inject the IP address and UserAgent into an email when a database record is saved. You need to trap the remote_ip and user_agent from the request method in the Controller instance for that request. That is where this information is received. Then you need

[Rails] Re: Rails requires RubyGems = 1.1.1 : problem

2008-12-30 Thread alberto
$ gem install rubygems-update $ update_rubygems --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-talk@googlegroups.com To unsubscribe from