Displaying 20 results from an estimated 30000 matches similar to: "Running php from RoR"
2007 Oct 24
8
validates_confirmation_of not working
Hello to everyone,
Well, very frustrated with this one because I am following the example
straight from the documentation and it is not working.
First when I try:
validates_confirmation_of :password, :on => :password_update
(password_update is a def in my User model which works fine without
this validation in please)
I get the following error:
TypeError in UsersController#update_password
2007 Oct 09
5
Backticks wrapping SQL values in polymorphic associations...
Hopefully the subject line didn''t scare you. That said...
I have a simple polymorphic relationship (is that possible?):
class Part
has_many :attachments, :as => :attachable
end
class Attachment
belongs_to :attachable, :polymorphic => true
end
Calling Part.find(:first).attachments yields this SQL error:
ActiveRecord::StatementInvalid:
Mysql::Error: Unknown column
2008 Sep 15
2
Can't get script/server (or any script to work) in beginning ROR installation
I have been following the instructions found in Apple''s Developer
Guide to developing ROR with Leopard found here:
http://developer.apple.com/tools/developonrailsleopard.html
I''ve gotten to the point where I''m supposed to execute "script/
server" (specifically, from the XCode run menu, but I get the same
error doing it from the console)...the result should be
2008 Feb 07
3
Sharing Sessions between Ruby on Rails and PHP
Hi there,
I have a RoR app but for one of the funcationality (photo uploads) I
am using PHP. I need to know how I can share/access session
information from RoR in PHP since the PHP also updates the database
and the entry information is contained in the RoR sessions.
Please advice.
Thanks in advance.
Adil
--~--~---------~--~----~------------~-------~--~----~
You received this message because
2007 Jun 11
12
Mocking system/`
This drives me insane on a regular basis. How does one mock
system(''blah'') or `blah` ?
Adding expectations on Kernel doesn''t do it. Adding expectations on
Object just makes me sad:
Object.any_instance.expects(:system).with(''ls'')
# => #<Mock:0x12b584e>.system(''ls'') - expected calls: 0, actual calls: 1
And this really
2008 Oct 08
11
Using image_tag and send_data
I am using image_tag to load an image that I''ve saved to the database
(using attachment_fu if you''re curious but that''s probably not
relevant here):
VIEW
<%= image_tag ''/photo/get_image/5'' %>
CONTROLLER
def get_image
@photo=Photo.find(params[:id])
send_data(DbFile.find(@photo.db_file_id).data,
:type =>
2007 Dec 23
7
Help with error "undefined method `downcase' for nil:NilClass" after migration
Hi all,
I have a rails 1.5.2 application. I''ve frozen the application via the
"rake rails:freeze:gems" command. This application worked well on a server
I previously had it installed on. My server was getting really slow, and I
requested that I be moved to a new server. When I perform a "gem list
rails" command on my new host, I receive only version 1.2.6. Since
2008 Apr 06
10
about the form_for ..
question one:
is there any select box tag for form_for?
now,perhaps i just can use the select or select_tag?
question tow:
i have a A model,it has one B such as:
class A< ActiveRecord::Base
belongs_to :B
when i use the form_for tag,how can i output the variable name?like
this:
<%form_for :a,@a,:url=>{:controller=>"a",:action=>"save"} do |f|%>
2008 Apr 16
12
how to accomplish pagination in RoR
Hi Folks,
I am just trying to get started up in RoR, I have done a simple
application of add, edit, delete....
I am now trying to accomplish pagination in RoR, I referred a few
tutorials, however none of the examples that i tried from there,
seemed to work error free..... I have heard that lots of things have
deprecated in RoR, can someone please post me a detailed report of how
i can
2008 May 21
8
before_filter with multiple roles
I have multiple roles in my application.
Now I want to block a method for all users except the administrator and
a manager.
When I do this:
before_filter (:check_administrator_role), :only => [:administration]
before_filter (:check_taskmanager_role), :only => [:administration]
The user must have both roles. How can I change that to an "OR"
combination?
--
Posted via
2009 Mar 01
15
Ajax in Rails
Hi All,
New to the group, and new to learning rails.
I''m having some trouble, i''ve done a few tutorials on creating some
small apps with rails and am now starting to play around myself.
I''ve been trying to create a simple form which when a user enters any
data that data is displayed as a preview elsewhere on the page
instantly, just like when creating an advert with
2011 Dec 05
2
About Latest version of ROR
hi all,
i have application developed in following ruby ,rails and gem version i
want to upgrade it with latest version,can anyone tell what are
stable version for ruby,rails and gem ? and also with compability for
Ruby and Rails version with latest gem version ?
gem version:1.3.7
ruby version:ruby 1.8.7 (2011-02-18 patchlevel 334) [i386-mingw32]
rails version:Rails 1.1.6
thanks in advanced
2008 Jul 15
9
Beginner Question.
I''m just getting into RoR, coming from a long PHP background. So far I
LOVE IT!
I''m hitting a roadblock with updating my mysql database. For
simplicities sake, I have 2 tables and here are the relevant columns.
Table Users
id
name
email
Table Issues
id
createdby
assignedto
reportedby
In my models I have everything mapped properly I believe.
When I try to update the
2008 May 29
4
Drag/Drop finding droppable's properties?
Hi All,
I am trying to develop a dynamic form creator application, whereby we
can drag objects from a "palette" and drop them onto a "form" to build
the design of our form.
To achieve this, when I have dragged the object, and dropped it onto
the "form" area, I want to get the position of where the object was
dropped.
I have a droppable area:
2008 Dec 31
7
Understand submit_tag
Hi everyone,
I was following the book Agile Web Development with Rails 2Ed. by Dave
Thomas.
So, at some part of my studies, I decided to try to create my own
application based on what I''ve learned...
Now I''m in trouble in a simple form.
I tried to create a form to register new users.
I''m sending attached the files that I created for this.
but my view don''t
2008 Feb 14
4
How do I access this parameter?
Hi,
I have a form for creating users ...
<% form_tag ''userconfirm'' do -%>
<!-- more code -->
<p><label for="user_login">Username</label><br/>
<%= text_field ''user'', ''login'' %></p>
<p><label for="user_password">Password</label><br/>
<%=
2008 Feb 27
7
older version of rails -- Unknown action error
Hi,
I''m using Rails 1.2.3 (constraint of the hosting company). I''m
getting this error
Unknown action
No action responded to subscriber
upon visiting http://mydomain.com/super_admin/subscriber/search
I have these files:
app/controllers/super_admin_controller.rb
app/controllers/super_admin/subscriber_controller.rb
app/views/super_admin/subscriber/search.rhtml
and below is my
2008 Dec 20
9
Upgrade to Rails 2 - problem with "save" (MySQL boolean issue?)
I have been working through an upgrade of my 1.2.6 application to
2.2.2.
I am almost there but I have hit a problem with ActiveRecord.
Before the upgrade, the following code was working fine.
def create_root(administrator)
root = create_root_collection(self.pingee_name,
administrator,
2008 Jun 22
3
Routing Error No route matches "/employee/list" with {:method=>:get}
hi,
I am very frustrated by this error when I just put together a very
simple project from one of the textbook on RoR:
Routing Error
No route matches "/employee/list" with {:method=>:get}
For your reference,
#The following is EmployeesController.rb
class EmployeesController < ApplicationController
scaffold :employee # create scaffold code for controller
#
2006 Apr 18
4
PHP and Rails integration
There a few php solutions that I would like to integrate with my Rails
app. Namely PHPBB(No offense RForum) and WordPress. Is it possible to
use these in a Rails environment, and what kind of issues/stumbling
blocks would I face if I attempted to?
Thanks,
James
--
Posted via http://www.ruby-forum.com/.