Displaying 20 results from an estimated 10000 matches similar to: "Maintaining referental Integrity"
2009 Apr 06
9
setup method in functional tests and instance variables
I have the following in my functional test file.
class UserControllerTest < ActionController::TestCase
fixtures :users
def setup
@controller = UserController.new
@request = ActionController::TestRequest.new
@response = ActionController::TestResponse.new
@invalid_user = user(:invalid_user)
@valid_user = users(:valid_user)
end
def test_login_success
2009 May 18
2
Move rails app from 2.0.2 to 2.3.2
How do I make my application work in 2.3.2 when it was created in 2.0.2?
Thanks
Mitch
--
Posted via http://www.ruby-forum.com/.
2010 Aug 17
1
how to get plugins to load
I un-commented the following in my environments.rb file
config.plugins = [ :all, :exception_notification, :ssl_requirement]
but I get the following errors:
in `ensure_all_registered_plugins_are_loaded!'': Could not locate the
following plugins: exception_notification and ssl_requirement
(LoadError)
from
/Users/mitch/.gem/ruby/1.8/gems/rails-2.3.2/lib/rails/plugin/loader.rb:44:in
2006 Apr 24
5
New RBAC Plug-In for Rails
Hi,
I just finished writing this plug-in. I''ve been using rails for awhile
but this is my first time extracting some code and writing it as a
plug-in and I''d love to hear to some feedback. Thanks.
http://mitchellhashimoto.com/rails/role-based-access-control-plug-in-for-rails/
-Mitchell
--
Posted via http://www.ruby-forum.com/.
2008 Oct 06
4
what is Driver & what is Adapter ?
what is Driver & what is Adapter ?
--
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
2008 Apr 16
8
Will acts_as_taggable_on_steroids and better_nested_set work together?
I am having this crazy problem where it ONLY shows up in testing.
This is my test code
<code>
def test_should_destroy
task1 = Task.new(:description => "tmp",
:done => false,
:user => User.find_by_login(''admin''))
assert task1.save
assert task1.destroy
end
</code>
This is my task model
2009 Mar 25
11
ActiveRecord: Nested :include erroneous behavior
Hi,
Found a simple example breaking on moving to 2.2 from 2.0. This
example illustrates the usage of nested :include finder options.
class Book < ActiveRecord::Base
has_many :distributors
end
class Distributor < ActiveRecord::Base
belongs_to :book
has_many :agents
end
class Agent < ActiveRecord::Base
belongs_to :distributor
has_many :shops
end
class Shop <
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 =>
2019 Oct 10
3
CentOS 8 Installation Not Recognizing Local Disk
I have an older Dell PowerEdge server with one hard drive, with CentOS 7 currently installed. I wanted to do a clean install of CentOS 8, but it doesn't pick up the hard drive. When I click on the destination to pick the hard drive it only shows the USB drive that I'm installing from. I checked for a RAID configuration on the server, but there is only one disk, and no RAID is configured.
2006 Feb 28
2
database tables
I have been assigned a task of building a front end to a database that has already been created. All the database tables have the naming convention of lclclcClclclc. For example; tblComputerNames. How do i get around this in rails since it likes lower case table names to keep with its naming conventions for classes and objects?
Mitch
Mitch Raful MCSE, CCNP
Network Engineer
MCCS Quantico
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 Aug 24
11
link_to_function check javascript attribute
How could I check the value of an javascript object''s attribute?
<div id="new_item_details" style="display:none"></div>
<%= link_to_function("Show details...", nil, :id => "show_details") do
|page|
page.visual_effect(:toggle_blind, :new_item_details)
if (page[:new_item_details].style.visibility ==
2008 Oct 08
9
Plugins and the test environment
Hi guys. I''m writing a plugin for use in the test environment.
However, when I run ``rake test'''' or ``rake spec'''', RAILS_ENV is set
to "development" when my plugin''s init.rb is run.
How do you configure a plugin to load require a file in the test
environment?
Thanks,
Nick
--~--~---------~--~----~------------~-------~--~----~
You
2006 Jul 03
13
Eager loading ActiveRecord objects
I have a complex graph of ActiveRecord entities that I want to load with
one big honkin'' join query to avoid ripple loading. It''s for a report.
However :include doesn''t get me all the way there because I want to load
parents of parents (or children of children). I don''t mind doing the
SQL by hand but I''m not quite sure what to do to get the result
2011 Jan 08
9
options_for_select.
Even reading the documentation I can not figure out what is the
select_tag difference between this:
<% = select_tag (bags [], "options_for_select (bags.collect @ {| bb |
[bb.bag_type, bb.id]},
ruser.bags.collect @ {| ub | ub.id}), {: multiple => true,: id =>
"bags"})%>
and this:
<% = select_tag "bags [], " options_for_select (bags.collect @ {| bb
2009 Jan 05
5
ROXML versus simple to_xml
How they differ?
Does the to_xml method of the classes array/hash/object is based on
ROXML lib?
As I see in http://roxml.rubyforge.org/#quickstart, roxml needs we
define the class (class Book in the guide) before to convert a object
to xml. Moreover, the method to_xml (when not using "include ROXML")
just accepts any existing object, what is much suitable.
I need to compare and tranfer
2011 Aug 05
6
"bundle install" fails because of git gem
Hey everyone,
I''m having an incredibly difficult time getting bundle to work
properly on my production server.
My production server setup:
Ubuntu 10.04
Ruby 1.9.2p290
Rails 3.0.4
Passenger
rvm 1.6.32
My Gemfile (relevant parts):
gem ''linkedin'', :git => "https://github.com/renatosnrg/linkedin.git"
Whenever I try to do "bundle install" I get this
2010 Feb 25
10
ajax.updater problem
Hi everyone
I´know that it is not a ajax forum, but Im using ajax ina program
created with rails code and I think that I´m not the unique person who
use the Ajax. UpdaterPeriodically.
My problem is that my program doesn´t refresh the div tag, following
it´s my source code. Anyone can say me why it doesn´t work?
<head>
<%= javascript_include_tag ''prototype'' %>
2008 Sep 02
7
Deploying My Rails App
I have just finished my first Rails application following the
lynda.com tutorial, but I am not sure how to get my application on the
internet.
I have an ftp account through the applemachine server, but from what I
have read, I''m afraid I will not be able to host my application there.
What I am looking for is step by step directions on how to get from a
working Ruby on Rails application
2008 Jun 07
5
Can create record but can not update it => has_many through
Hi All,
I have a problem using has_many through association. I can create a product
without problem, but when i edit it, i got this NoMethodError:
undefined method `reciters='' for #<Product:0xb71a77e8>
Did i miss something to code? I provided the codes below. Please help
Thanks,
Dida
product_controller.rb
======================
def create
@product =