[Rails] I troubled with ajax processing.

2011-07-30 Thread 原田伸也
Hi , all! I want to save the stars. but when I reload the browser, The date is initialized. I don't know how to save the date. Please help me some advise. Thanks for reading my code. [code] $(document).ready(function(){ $(".star").click(function(){ // $("#star_9").click(function(){ // ale

Re: [Rails] it doesn't work jquery

2011-07-30 Thread 原田伸也
It worked correctly.Thanks! -- 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 this group, send email to rubyonrails-talk+unsubscr...@googlegroups.c

Re: [Rails] Sqlite manager

2011-07-30 Thread Peter Hickman
There is also http://sqlitecc.sourceforge.net/ http://www.yunqa.de/delphi/doku.php/products/sqlitespy/index http://sqlitebrowser.sourceforge.net/ And a whole heap here http://www.sqlite.org/cvstrac/wiki?p=ManagementTools -- You received this message because you are subscribed to the Google G

Re: [Rails] Sqlite manager

2011-07-30 Thread Everaldo Gomes
I heard about a firefox plugin: https://addons.mozilla.org/pt-br/firefox/addon/sqlite-manager/ On Sat, Jul 30, 2011 at 7:31 PM, Leoncio Caminha wrote: > cual tu sistema operacional? una dica, cuado for hacer preguntas, en ingles > por favor, es la lingagem universal :) > > Enviado via iPad > >

Re: [Rails] Sqlite manager

2011-07-30 Thread Leoncio Caminha
cual tu sistema operacional? una dica, cuado for hacer preguntas, en ingles por favor, es la lingagem universal :) Enviado via iPad Em 30/07/2011, às 18:02, Hernan escreveu: > Me pueden recomendar algún manager para Sqlite, free de ser posible? > Gracias > > -- > You received this message be

[Rails] Question about Helpers

2011-07-30 Thread Filippos
Studying the RoR 3 Tutorial book by Michael Hartl and on page 345 there's the code inside the SessionsHelper: _ module SessionsHelper def sign_in(user) cookies.permanent.signed[:remember_token] = [user.id, user.sault] self.current_user = use

[Rails] Sqlite manager

2011-07-30 Thread Hernan
Me pueden recomendar algún manager para Sqlite, free de ser posible? Gracias -- 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 this group, send emai

[Rails] Re: mysql2 and swedish characters

2011-07-30 Thread Frederick Cheung
On Jul 30, 9:50 pm, jeb wrote: > No encoding set in database.yml, cp1252 set in mysql. By it self I > guess. > that sounds like you should change the encoding for your existing tables/columns to utf8 One way of doing this is to alter the columns to blobs and then back to a text column with the

[Rails] Re: Rails and Service Oriented Architecture (SOA): any downsides?

2011-07-30 Thread Noah Goldman
One potential problem is providing satisfactory security. The traditional security model has all the protection features built into individual applications, but opening access to all applications as services can and is likely to result in structural vulnerabilities. This problem is being researched

[Rails] Re: mysql2 and swedish characters

2011-07-30 Thread jeb
No encoding set in database.yml, cp1252 set in mysql. By it self I guess. On 30 Juli, 22:37, Frederick Cheung wrote: > On Jul 30, 9:21 pm, jeb wrote: > > > That seems to work, the problem is when reading the data using mysql2. > > In the database å is stored as å. > > When I write to the datab

[Rails] [ANN] Vidli, The Open Source Video eCommerce Platform

2011-07-30 Thread Nathaniel Brown
== Welcome to Vidli Vidli ( http://vidli.com ) is the first of its kind Open Source Video eCommerce platform. Specifically designed for video content owners that are looking to setup a distribution storefront. Vidli is built on the Ruby on Rails v3 framework. Out of the box, Vidli integrates

[Rails] Re: mysql2 and swedish characters

2011-07-30 Thread Frederick Cheung
On Jul 30, 9:21 pm, jeb wrote: > That seems to work, the problem is when reading the data using mysql2. > In the database å is stored as å. > When I write to the database using mysql2, without having changed it, > it writes å. > What does mysql think the column types are ? Before using mysql2,

[Rails] Re: mysql2 and swedish characters

2011-07-30 Thread jeb
That seems to work, the problem is when reading the data using mysql2. In the database å is stored as Ã¥. When I write to the database using mysql2, without having changed it, it writes å. On 30 Juli, 22:17, Frederick Cheung wrote: > On Jul 30, 8:31 pm, jeb wrote: > > > I think it's more a ques

[Rails] weird counter_cache behaviour, went unnoticed, is untested?

2011-07-30 Thread Filip
Hello, in the current project i'm working on i have a simple relation model setup Gallery and Image now i have the counter_cache set up correctly and it worked wonders while i had only a simple crud. Hovewer i am now implementing a manager for images and galleries, say i always select one gallery

[Rails] Re: mysql2 and swedish characters

2011-07-30 Thread Frederick Cheung
On Jul 30, 8:31 pm, jeb wrote: > I think it's more a question of how the data is stored in the > database. > In my layout i have: > > and in application.rb: > config.encoding = "utf-8" > Also possible. If previously the database connection was configured as some latin1 variant and your columns

[Rails] Re: mysql2 and swedish characters

2011-07-30 Thread jeb
I think it's more a question of how the data is stored in the database. In my layout i have: and in application.rb: config.encoding = "utf-8" :-) j On 30 Juli, 20:15, Frederick Cheung wrote: > On Jul 30, 7:00 pm, jeb wrote: > > > When using the mysql2 gem with my excising databases all non-sta

Re: [Rails] Re: Combine two collections of objects

2011-07-30 Thread Colin Law
On 30 July 2011 18:10, Stefano wrote: > I guess so. It just seems to grow endles and the queries for the DB > seem to get more and more complicated. > > Well I guess thats the way to go then. Thanks Colin. > > I wonder when you hear from Amirite again ;) Sorry, you have lost me. Colin -- You r

[Rails] setting an extra attribute of the join model.

2011-07-30 Thread Mauro
https://gist.github.com/1114858. How can I set the quantity DeliveryItem in the same form so that when I update the customer attributes the Delivery is created with products and their quantity? -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" gro

[Rails] Re: Your bundle is complete! It was installed into ./rmagick

2011-07-30 Thread Nopik
Same here! I ended up having all gems in ./asin, which was painful.. even 'whole project search' in rubymine was finding things there ;) bundle install should warn about this.. On Jul 30, 9:58 am, Pete wrote: > Thank you so much - this was driving me crazy!!! > bundle path in config was set to r

[Rails] Re: mysql2 and swedish characters

2011-07-30 Thread Frederick Cheung
On Jul 30, 7:00 pm, jeb wrote: > When using the mysql2 gem with my excising databases all non-standard > chars gets messed up: > > från is shown as frÃ¥n in the browser > > Is this possible to fix or do I have to continue using the old mysql- > gem? IIRC mysql2 forces use of utf8. If you're els

[Rails] Re: Re: Re: Rails 3 not working with windows 7

2011-07-30 Thread milton s.
Manish Nautiyal wrote in post #939302: > Manish Nautiyal wrote: >> radhames brito wrote: >>> Then it could be that mysql2 is not supported >> >> >> Then wht the solution? > > From surfing net for so long what I got is this. > > The mysql2 gem does not currently support Windows (although I hear they

[Rails] mysql2 and swedish characters

2011-07-30 Thread jeb
When using the mysql2 gem with my excising databases all non-standard chars gets messed up: från is shown as frÃ¥n in the browser Is this possible to fix or do I have to continue using the old mysql- gem? -- You received this message because you are subscribed to the Google Groups "Ruby on Rai

[Rails] Re: Combine two collections of objects

2011-07-30 Thread Stefano
I guess so. It just seems to grow endles and the queries for the DB seem to get more and more complicated. Well I guess thats the way to go then. Thanks Colin. I wonder when you hear from Amirite again ;) On Jul 30, 7:00 pm, Colin Law wrote: > On 30 July 2011 16:36, Stefano wrote: > > > > > >

Re: [Rails] Combine two collections of objects

2011-07-30 Thread Colin Law
On 30 July 2011 16:36, Stefano wrote: > Hi guys > > I am not sure if it is actually possible what I am trying to do, but > Im sure you can help me with it. > Let me start with my models: > > class User < ActiveRecord::Base >  has_many :wall_posts, :class_name => "Post", :foreign_key => > "wall_id"

[Rails] Re: Combine two collections of objects

2011-07-30 Thread Stefano
Yeah I thought about that but it wouldnt work beacuse the last 10 things might only be posts and no invites. yet I would still try to fetch invites. Also I think it would get very confusing with offset if not impossible. I tried to 'extend' the post item but it doesnt quite feel right.. I could ma

Re: [Rails] Image store in mysql database

2011-07-30 Thread Norm Scherer
On 07/29/2011 10:11 PM, john paul wrote: I have create one rails application here i can upload image and save mysql database ,i got some error ,so kindly help for me We need to know specifically what you did and specifically what the result was before anyone can or will offer any opinion. It w

[Rails] Ang.: Get the current user as Json with Devise

2011-07-30 Thread Linus Pettersson
Ok. Adding attr_accessible :id to my model works. But is it safe to do it like this? -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/uff6lPVoj-o

[Rails] Re: Combine two collections of objects

2011-07-30 Thread Frederick Cheung
On Jul 30, 4:36 pm, Stefano wrote: > Hi guys > > I am not sure if it is actually possible what I am trying to do, but > Im sure you can help me with it. > Let me start with my models: > > class User < ActiveRecord::Base >   has_many :wall_posts, :class_name => "Post", :foreign_key => > "wall_id",

[Rails] Re: packing a json object

2011-07-30 Thread Frederick Cheung
On Jul 30, 4:17 pm, jdkealy wrote: > when i try this without quotes, all my javascript breaks. > probably worth looking at what's wrong then. Fred > On Jul 30, 10:47 am, Frederick Cheung > wrote: > > > > > On Jul 30, 3:57 am,jdkealy wrote: > > > > A date looks like Fri Jul 29 2011 22:54:08 GM

[Rails] Combine two collections of objects

2011-07-30 Thread Stefano
Hi guys I am not sure if it is actually possible what I am trying to do, but Im sure you can help me with it. Let me start with my models: class User < ActiveRecord::Base has_many :wall_posts, :class_name => "Post", :foreign_key => "wall_id", :order => 'created_at DESC' has_many :invites, :cl

[Rails] Ang.: Get the current user as Json with Devise

2011-07-30 Thread Linus Pettersson
Actually, the user is outputted when accessing other resources, I can work with that :) One issue, I want the user object to also show the user ID. Now it only shows the email and username. It renders the json like this: [ - - { - email: "em...@example.com" - username: "Ex

[Rails] Re: packing a json object

2011-07-30 Thread jdkealy
when i try this without quotes, all my javascript breaks. On Jul 30, 10:47 am, Frederick Cheung wrote: > On Jul 30, 3:57 am,jdkealy wrote: > > > > > A date looks like Fri Jul 29 2011 22:54:08 GMT-0400 (EDT) > > > When i select from my events table i run: > > @member_calendars = Member::Calendar.f

[Rails] Re: Actionmailer Help Needed

2011-07-30 Thread Frederick Cheung
On Jul 30, 12:28 pm, Jenny Blunt wrote: > Ok, I'm nearly there. > > Have figured out how to get actionmailer to email those users with tasks > due. That was ok after I got my head around it. > > I can get the email view to list ALL tasks but not just those owned by a > user. In my view, I've tri

[Rails] Re: packing a json object

2011-07-30 Thread Frederick Cheung
On Jul 30, 3:57 am, jdkealy wrote: > > A date looks like Fri Jul 29 2011 22:54:08 GMT-0400 (EDT) > > When i select from my events table i run: > @member_calendars = Member::Calendar.find_by_sql("SELECT * from > calendars") > @json_calendar = ActiveSupport::JSON.encode(@member_calendars) > > How c

[Rails] Re: sessions and security?

2011-07-30 Thread Matt Jones
On Jul 29, 10:49 am, 7stud -- wrote: > The user goes on vacation for two weeks.  While the user is on vacation, > the malicious user gains access to the user's computer and inspects the > cookies on the user's computer, > and copies the token plus timestamp.  The malicious user goes to his > com

Re: [Rails] [RAILS3.1] Capybara does not find the text that is actually there!

2011-07-30 Thread Norbert Melzer
OK, setting the body a oneliner does the test pass... Thank you! -- 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 this group, send email to rubyo

[Rails] Get the current user as Json with Devise

2011-07-30 Thread Linus Pettersson
Hi! I use Devise and Basic HTTP Authentication to access user areas from a mobile app. When the user enters its details in the app and it tries to "login" (you don't actually login with basic auth as you send the credentials with each request) I want to get a response back with the user info,

Re: [Rails] [RAILS3.1] Capybara does not find the text that is actually there!

2011-07-30 Thread Colin Law
On 30 July 2011 12:45, Norbert Melzer wrote: > This was originaly posted on stackoverflow > () > > It would be nice if answers could be there to, if not I will summarize > the helping answers and pos

[Rails] [RAILS3.1] Capybara does not find the text that is actually there!

2011-07-30 Thread Norbert Melzer
This was originaly posted on stackoverflow () It would be nice if answers could be there to, if not I will summarize the helping answers and post them there. ---8<--- SO Post beginns here: In my ac

[Rails] Re: Actionmailer Help Needed

2011-07-30 Thread Jenny Blunt
Ok, I'm nearly there. Have figured out how to get actionmailer to email those users with tasks due. That was ok after I got my head around it. I can get the email view to list ALL tasks but not just those owned by a user. In my view, I've tried this: <% Task.tasksdue.find_each do |task| %>

[Rails] Re: Actionmailer Help Needed

2011-07-30 Thread Jenny Blunt
Hi Fred This is the part that I really don't understand how to deal with. I don't understand how I link what you've asked me to do above listing the users with due tasks with actionmailer. Thanks -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscri

[Rails] Re: Your bundle is complete! It was installed into ./rmagick

2011-07-30 Thread Pete
Thank you so much - this was driving me crazy!!! bundle path in config was set to rmagick BUNDLE_PATH: rmagick On Jul 29, 1:17 am, Frederick Cheung wrote: > On Jul 29, 9:04 am, Pete wrote: > > > I am running ruby 1.9.2p290 and Rails 3.0.9 on OSX Lion > > > When I run bundle install, it installs

Re: [Rails] Image store in mysql database

2011-07-30 Thread Colin Law
On 30 July 2011 06:11, john paul wrote: > I have create one rails application here i can upload image and save > mysql database ,i got some error ,so kindly help for me I don't know how anyone is supposed to help if you do not give details of the problem you are seeing. Colin -- You received t