similar to: inserting values in two tables at one button click

Displaying 20 results from an estimated 300 matches similar to: "inserting values in two tables at one button click"

2005 Oct 11
4
Searching an attribute in a hmabtm relationship
(Nuby to Ruby and Rails...) I''ve implemented security using the login generator in a simple app so that I have a user table, a roles table, and a join between them (roles_users). All works as expected. I now need to check if a user has a specific role, but my approach is off somehow. Here''s what I''ve tried thusfar: user_roles = @session[:user].roles
2007 Aug 10
1
How to spec a model method
Still new to Specs... How do I create a spec to test a model method? Specifically, here is my spec: #testing model describe User do it "should have many user roles" do User.reflect_on_association(:user_roles).should_not be_nil end it "should have many roles though user roles" do User.reflect_on_association(:roles).should_not be_nil end it "should know
2011 Jan 02
3
how to has_many User::Role?
So I just found out that I sort my models via folders and am starting a new project to mess around with this some. So I started working on can-can, but am at a lost on how to do "has_many :user_roles" -- 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
2010 Nov 30
4
Cucumber+Capybara rails 3 issue (Don't know where exactly)
When I''m executing cucumber tests, I noticed that sometimes rails app (in test env.) getting several the same requests (GET or POST) usually around 3, and it doesn''t render anything with empty HTTP status code. Have anyone met something similar to that issue? here is some example of log file: Started POST "/account" for 127.0.0.1 at 2010-11-30 22:34:17 +0200
2010 Jan 21
2
nested forms and attr_accessable
Rails 2.3.5 I am working on a nested form that assigns roles to users through a table called clearances. I have attr_acessable turned off globally in an initializer: ActiveRecord::Base.send(:attr_accessible, nil) I have this set in clearance.rb attr_accessible(:description, :effective_from, :role_id, :superceded_after, :user_id) And this is what params looks like after the
2008 Nov 07
2
Applying a function to a list of arguments ...
How can I apply function f, that I get as an argument as in func <- function(f, ...) { . . . } to a list of arguments list(a, b, c) (eg the ... argument of func above) in order to obtain f(a, b, c) Thanks a lot, Roberto [[alternative HTML version deleted]]
2007 Jan 11
4
collection_select - how to set selected options?
In a form, I am trying to use collection_select with multiple=true, like so: collection_select(:user, :roles, Role.find(:all), ''id'', ''name'', {}, :multiple => true) %> My multiple select box is rendered fine, but... I want the select to have the current role options for the user pre-selected when I view it. So if there are five roles in the database and
2006 Jul 25
1
template
I''m really newbie in roby on rails. I''m studing but I can''t find an answer to this question: I''m looking for the classic tamplate that I can found on every ruby-on-rails generated sites: I would like to use in my site I can found some already listed? -- Posted via http://www.ruby-forum.com/.
2007 Aug 27
1
MANAGESIEVE patch v7 for dovecot 1.0.3 and TLS
Hi, I allow only TLS/SSL connection to dovecot. The managesieve doesn't work with TLS but it works without it. gladiac at magrathea:~> gnutls-cli -p 2000 -s --insecure -V milliways.cynapses.org Resolving 'milliways.cynapses.org'... Connecting to '213.239.217.124:2000'... - Simple Client Mode: - Received[194]: "IMPLEMENTATION" "dovecot"
2015 Nov 24
3
Why isn't it possible to lower TCP values of running SSH session?
On Tue, Nov 24, 2015 at 12:57 AM, Damien Miller <djm at mindrot.org> wrote: > TCP is the kernel's responsibility. I guess that these values get > copied into each TCB from the copy managed via proc at connection > start time, but never updated afterwards. > This had to happen but the question is why is it possible to increase a timeout but not to decrease it. --
2005 Dec 21
3
What books are coming out???
What Rails books are coming out soon ??? John McClain Senior Software Engineer TCS Healthcare jmcclain-RI2jYlfFOOy2dUpmj6OxPQC/G2K4zDHf@public.gmane.org (530)886-1700x235 "Skepticism is the first step toward truth"
2005 Feb 27
2
Introducing the Asterisk Realtime Architecture - ARA
I've added an introduction article about the ARA on my web site http://www.voip-forum.com/ The same text is now also added to CVS head as README.realtime. On the same site, you will also find the news item about how we used Asterisk for a call from an airline jet above Greenland to Stockholm, Sweden. The world is getting smaller and more connected every day! /Olle
2012 Apr 03
4
one master table to hold symbols: good or bad idea?
(This is may be more of a db design question than a rails question.) Summary: I''m thinking of creating a single AR class to hold constant symbol values and use it for :has_many_through relations whenever I need a constant symbol. Is this a good idea or a bad idea? Details: I notice that I have a lot of models that contain just a name string: create_table
2008 Nov 19
2
do.call and plotting functions ...
I'm trying to write a simple wrapper for plotting functions to make them print to postscript, something like ploteps <- function(file, plotFunction, ...) { args <- list(bquote(...)) # prepare postscript device do.call(plot, args) # close postscript device } I have inserted the bquote otherwise I get a lot of numbers in the plot when I plot/hist something. But if I invoke
2013 Oct 23
0
[LLVMdev] [PATCH] Loop Rerolling Pass
I mistakenly not cc’ed the list. On Oct 23, 2013, at 8:28 AM, Renato Golin <renato.golin at linaro.org> wrote: > On 23 October 2013 14:13, Arnold <aschwaighofer at apple.com> wrote: >> What I am proposing for interleaved data vectorization would not transform the loop before vectorization (because there is not much you can do in the general case). There would not be a need
2007 Dec 05
4
coxme frailty model standard errors?
Hello, I am running R 2.6.1 on windows xp I am trying to fit a cox proportional hazard model with a shared Gaussian frailty term using coxme My model is specified as: nofit1<-coxme(Surv(Age,cen1new)~ Sex+bo2+bo3,random=~1|isl,data=mydat) With x1-x3 being dummy variables, and isl being the community level variable with 4 levels. Does anyone know if there is a way to get the standard error
2010 Jun 03
2
creating fixtures for has_many :through
I''m stymied at how to create a fixture that establishes a has_many :through relationship. I''ve watched the railscast at: http://media.railscasts.com/videos/081_fixtures_in_rails_2.mov ... but that''s for HABTM relationships. I''ve read: http://www.ruby-forum.com/topic/145676 but that ultimately doesn''t answer any question. So with no further ado:
2017 Jul 01
4
[RFC] Placing profile name data, and coverage data, outside of object files
On Fri, Jun 30, 2017 at 5:54 PM, via llvm-dev <llvm-dev at lists.llvm.org> wrote: > Problem > ------- > > Instrumentation for PGO and frontend-based coverage places a large amount > of > data in object files, even though the majority of this data is not needed > at > run-time. All the data is needlessly duplicated while generating archives, > and > again while
2006 Jan 17
4
find_by_sql column ordering defect?
Hello. I have a program that accesses a metadata (translation) table for column names as well as the ordering of columns for a specific model. Also in there is a collection of bool options such as column_visible_on_form, column_visible_on_screen_quicklist etc. The idea is that our customer can specify to a certain extent how their layout/user interface will appear. To accomplish this, I use
2010 Oct 27
0
Help with routes
Switching our routes file from Rails2 to Rails3 DSl uncovered an odd situation, of my own making, but I am having some difficultly imagining how to fix it. Basically I have a commonplace: user -> user_role (clearance) <- role type arrangement where: User has_many :roles, :through => :clearances has_many :clearances Clearance belongs_to :role belongs_to :user and Role