Displaying 20 results from an estimated 10000 matches similar to: "Can (should) each :user have his own table?"
2009 Aug 11
13
I've decided to use Rails... (I hope I made the right decision).
I''ve read a ton of comparisons that compare one framework to another,
and one language to another. There''s so much conflicting advice out
there that it''s hard to know what is best. Did I make the right
choice choosing Rails for my first web project? I guess we''ll see.
The only reason why I''m hesitant is that a lot of the big name sites
use php
2008 Jul 08
3
undefined method `name' ...........
Hi Community....
I''m new in this game, so this might be a easy question, but I have
done my google, without result, so I will try this....
I''m learning ROR, and I''m using Patrick Lens ''Ruby on Rails'' book.
(This is written for ror 1.x - and I''m using NetBeans 6.1 - ror 2.x -
this might be the problem...)
But...
I have made this
2010 Feb 15
1
moved from ruby 1.8.6 to 1.8.7 and "We're sorry, but something went wrong."
I''m a windows user, and I was using ruby 1.8.6 installer over at
RubyInstaller.org. All was working well, but I decided to give ruby
1.8.7 a try. I uninstalled 1.8.6, downloaded and installed ruby 1.8.7
from rubyinstaller, reinstalled rails and all of my gems, and copied
over sqlite3.def and sqlite3.dll to the Ruby/bin.
I then my start my server (just using webrick for now, same as
2010 Feb 16
7
YAML, UTF-8, TextMate, Notepad
This is not a question but a report on the difficulties I had and the
solution I found with respect to UTF-8, YAML::load, and Ruby/Rails.
Comments are appreciated.
- - -
I had been struggling for two days to get UTF-8 working in my Rails app.
I had/have a localization file, lib\locale\de.yml, that had iso-8859-1
encoding. I could not get that to display properly.
Marnen, quite correctly,
2010 Jan 27
4
Better way to count Active Record Data?
I am trying to get hourly counts of orders between different price
ranges from my database. I''m thinking there has got to be a better way
than looping through each record and checking if the created_at time
fits between hour 1, 2, 3, 4, etc of the day and then returning the
count.
Currently I am displaying just a total of the days sales that are
between different dollar amounts this
2006 Jul 25
8
Creating records in two models in a RESTful way.
Hey everyone,
I have a philosophical question here. Say I have a website that uses two
models for accounts: Person and Company. Normally I would just have
/accounts/new for user signup.
However, the RESTful way to do it is to have /people and /companies.
Unfortunately, this doesn''t account for a situation where you''d have a
one-page signup form. I wouldn''t want
2009 Sep 01
9
Ruby on Rails Project Opportunities
Hi
I am currently recruiting for a number of freelance contracts and
permanent internal positions, both junior and senior, for Europe''s
largest and most dynamic Ruby on Rails development projects, offering
the chance to work alongside some of the industry''s leading figures in
the Web 2.0 development community. Selected locations include Germany
(eg Berlin, Munich, Hamburg,
2009 Sep 07
11
autoincrement for non-id column
There is a table:
execute (<<-SQL)
CREATE TABLE "tasks" (
"id" serial primary key,
"number" serial,
"version" integer DEFAULT 0 NOT NULL,
"latest_version" boolean DEFAULT ''t'' NOT NULL,
"hidden" boolean DEFAULT ''f'' NOT NULL,
"type" character varying (1) NOT
2011 Jan 02
6
Database Design
Hello,
I have a user table that stores their username, email address, and
password. (along with salt, etc)
However, now I want to have more complex information associated with
each user (address, etc). I''m no DBA expert, so in terms of
performance, which is better:
- A user table that has all the fields in it (Username, Email,
password, country, state, zipcode, etc)
- A user table that
2009 Jul 05
4
Deploying without capistrano, using git pull?
I''m NOT working on an enterprisey big time rails application; just
something for my personal site.
I''ve been deploying via
local> git push origin master
remote> git pull origin
remote> sudo /etc/init.d/httpd restart
Trying to decide if this is sufficient, or if learning capistrano and
setting that up will give me any advantages over this?
Thanks,
Dave
2010 Dec 21
8
Rails - escape_javascript without all the \n\n\n\n\n
Hello, I''m using escape_javascript to return a partial to the browser
via ajax.
Something like:
$("#inject").html("<%=escape_javascript(render :partial =>"feed/
index")%>");
Problem is escape_javascript ends up outputing all kinds of wasted
space like
\n\n\n\n\n \n
Is there anyway in Rails to escape_javascript more
2010 Aug 13
10
:limit text mysql
I have a rails 3.rc app that I''m developing. I have a text entry in one
my models that can sometimes be quite big. I tried setting :limit =>
4294967296 on the text column in my migration file but this doesn''t seem
to have any effect. The column is till created as a TEXT column rather
than MEDIUMTEXT or LONGTEXT.
Does anyone have any idea why this might be happening? Is there
2010 Aug 05
7
Search large XML file -- REXML slower than a slug, regex instantaneous
Got a question hopefully someone can answer -
I am working on functionality to match on certain nodes of a largish (65mb)
xml file. I implemented this with REXML and was 2 minutes and counting
before I killed the process. After this, I just opened the console and
loaded the file into a string and did a regex search for my data -- the
result was almost instantaneous.
The question is, if I can get
2010 Mar 04
25
how to share variables in data migrations (up/down)
hi there,
How do we share variables in a given data migration?
For example,
the code below fails to work because "statuses" don''t seem to be in
scope for both up and down.
class AddDefaultValuesToStatuses < ActiveRecord::Migration
statuses = [
{
''details'' => ''details'',
},
{
2010 Aug 06
4
Object/Record foreign key IDs set to zero
Hello,
Hope no one minds me just jumping in here with a question.
I''m completely new to Ruby on Rails. I''ve been reading "Simply Rails
2", and following their examples. I reached a point where the unit
tests were unexpectedly failing. Upon investigation, I discovered that
when Rails loads the fixtures, the foreign keys aren''t being populated
with the foreign
2009 Sep 04
12
Changing cursor while waiting for remote function response?
Hello,
Google and the search function didn''t help me this time. Is it possible
to change the mouse cursor while waiting for a response of a remote
function call?
--
Posted via http://www.ruby-forum.com/.
2006 Apr 10
9
Pagination with letter (A B C D ... Z)
Hi there,
Is there a neat and easy way to implement pagination with letters
rather than numbers eg :
A B C D ... Z
Rob
2009 May 05
4
modalbox rails var interpolation
Howdy everyone.
I am using modalbox which is very nice an easy to use. I have this
for an edit for a company listing:
<td><%= link_to(''Manage Companies'', {}, :onclick => ''Modalbox.show(\''/
companies/edit/#{company.id}\'', {width: 600}); return false;'') %></td>
The link is not putting the company.id in it puts #{
2010 Nov 14
4
Problem with Rails 3 "rails server -d"
In my app controller I require a file named "configuration.rb" in the
config directory like so
require "config/configuration"
This has been working perfectly fine in Rails 2 in all environments
including prod. Having migrated to Rails 3 this works in all
environments if I run "rails server" without the daemon option. If I
run the server with the daemon option (-d),
2010 Jun 21
14
Controllers, what? why?
Hi,
I am starting to learn rails and I went through the guide and a couple
of tutorials. Even though I understand controllers or at least I can
use them I can''t see yet the whole picture.
Why do you need several controllers for a single application? If a
controller is just a class whose methods interface with models and
views, why not have a single controller for the whole application?