This came up a bit ago (http://stackoverflow.com/questions/399490) but it looks like the Rails plugin mentioned is not maintained (http://agilewebdevelopment.com/plugins/activerecord_base_without_table). Is there no way to do this with ActiveRecord as is?
If not, is there any way to get ActiveRecord validation rules without using Activ...
If I have user interactions in my Javascript layer, can I have Javascript actions trigger Rails controller actions and pass data from Javascript to those Rails methods?
...
When installing a gem on my system, I get the following error:
gem install blackbook --version ">= 1.0.7" --source http://github.com/tamoyal/blackbook/tree/master
ERROR: While executing gem ... (Zlib::GzipFile::Error)
not in gzip format
Any ideas as to why this is happening? I built the gem so maybe it is something wrong with my...
Hi, rails newbie here. I've started making a value based to-do list.
So far I've scaffolded my app like this:
dir> rails --database=mysql test1
dir> cd test1
test> ruby script/generate scaffold list item:string done:boolean value:int
[Changed default value of done to false in the migration file]
test> rake db:migrate
All is working ...
Whenever I load a blog post onto the page with Ajax, I set the page <title> to "My Blog - BLOGPOST_TITLE".
Of course "My Blog - " appears in my application layout as well.
The question is, how do I tell my Javascript about the string "My Blog - " without duplicating it in my code?
...
I upgraded mysql on my Mac from 5.0.x to 5.1.x (using a dmg package directly from mysql.com), which broke Rails (2.3.2). Previously everything was working correctly. The error I get is this:
!!! The bundled mysql.rb driver has been removed from Rails 2.2. Please install the mysql gem and try again: gem install mysql.
So I tried re-inst...
Hello,
I'm using a tool(UltraSms) that required three tables named (smsin, smsout & smsparts)
I need these tables to be used in the same Rails application that has other tables. With ActiveRecrod I know that table names has to be plural of the Active record class name by convention. Is there a way to map those to an ActiveRecrod class...
Say for example I've got an SQL schema that is ready to go. How would I import it into my Rails app so that I use my prepared database instead of all those funny migrations.
EDIT: You have all misunderstood my question so far. I'm asking if I had a working database application in say PostgresQL. How would I use this as the basis of my R...
I have this line in routes:
map.resources :questions, :new => {:vote_for => :put, :vote_against => :put}, :has_many => :replies, :shallow => true
And I use the following helpers in my view:
link_to 'OK', vote_for_question_path(@question), :method => :put
link_to 'NO', vote_against_question_path(@question), :method => :put
But unfort...
I forgotten the name of this library. But it's sort of like Wiki how you type certain characters in front of your text, and then it'll make the text bold/italic/underline.
I'm not asking for the way Wiki is formatted but I'm aware there is something similar built into Rails. It's at the tip of my tongue. Thanks.
...
I have an array full of user logins that was loaded from the database. What's the simplest and efficient way to keep only the logins that contain non-ascii characters?
logins = Users.find(:all).map{|user|user.login}
logins_with_non_ascii_characters = logins.select{ |login| ...??? }
Thanks
Edit: if you have a SQL solution (I use MySQ...
Being new to Ajax, I would like to understand which data exchange format - JSON or XML - would be easier to work with while doing Ajax in Rails.
Do the various Rails helpers make one or the other format easier to deal with or does it depend on the context or does it not matter at all?
...
I'm currently in the process of beginning a migration from fixtures to factories and running into some test database challenges.
When I run my entire test suite the database is cleaned out and the new factory-generated data reloaded. However, when I run individual unit tests the database does not clean out the old values.
I could run ...
It occurred to me that if I have a has_many join, where the foreign model does not have a belongs_to, and so the join is one way, then I don't actually need a foreign key.
We could have a column, category_ids, which stores a marshaled Array of IDs which we can pass to find.
So here is an untested example:
class page < AR
def categ...
i am trying to create my first rails plugin, and i want it to be configurable, that is to say, i want to be able to set a variable in the environment.rb file or something.
UPDATE: i'm trying to do something like what's done here: http://soakedandsoaped.com/articles/read/exception-notifier-ruby-on-rails-plugin. i have tried mimicking th...
I've got a Rails app that has stopped caching somewhere along the way, and I'm not sure which revision along the way might have stopped it from working.
I'm under the impression that page caching, when working properly, should never even hit Rails if it finds the cached file. However, when loading my page and monitoring production.log, ...
I am running into some issues regarding Authenticity Token in rails, as I did many times now.
But I really don't want to just solve this problem and go on, I would really like to understand Authenticity token.
Well, my question is, do you have some complete source of information on this subject or would spend your time to explain in deta...
I have two applications and want them to share their sessions. This is trivial, at least so far. Now I am running in some stange issue.
I have set the same session_key and secret in the environment.rb and the two applications did not share the same session.
Verified if development.rb has something... nothing.
Tried to cleanup cookies ...
actionmailer
actionpack
activeresource
activesupport
I have a basic scaffolded CRUD app that uses ActiveRecord to connect to a SQLite database and I have frozen my Rails gems.
Which of these gems could I delete without affecting my app?
...
I'd like to only allow h2 and h3, but I'm not sure how to edit the list in the dropdown shown by adding the 'formatselect' button.
...