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
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
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
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' %
%=
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
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
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
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
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
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
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' %
%
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 ;
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
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
:
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
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 =
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
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
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
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
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.
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
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
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 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
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,
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
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
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
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
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
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.
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.
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
$ 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
35 matches
Mail list logo