search for: right_id

Displaying 10 results from an estimated 10 matches for "right_id".

Did you mean: right_idx
2006 Feb 15
4
problem with saving id''s in a join table
...fields for each right, a record is added to table roles but none to roles_rights. I am using Ruby 1.8.4 rails 1.0 mysql 5.0 here is my code: ============================ controller: ============================ def create @role = Role.new(params[:role]) @role.rights = Right.find(@params[:right_ids])if @params[:right_ids] if @role.save flash[:notice] = ''Role was successfully created.'' redirect_to :action => ''list'' else render :action => ''new'' end end ============================ view: ================...
2006 Apr 27
7
Role Based Authorization recipe implementation?
i got the rails recipes book, i have now an auth system for users without problems, now i want to made a role based acces for my app, im following the "Role Based Authorization" recipe of the book but i cant make it to work even when the tables created and correctly added data manually definig the roles and rights. als i dont know how to define a right for use all the actions in a
2006 Apr 15
8
Migrations - adding a new table and automatically creating records
I want to create table called roles and then populate it with some new records...This doesn''t work. Is there something I''m missing? Craig class AddRightsAndRolesTables < ActiveRecord::Migration def self.up create_table :roles do |t| t.column "name", :string end Role.reset_column_information Role.new :name => "Users Admin"
2017 Dec 01
2
Using Scalar Evolution to Identify Expressions Evolving in terms of Loop induction variables
...g int currNode = no_of_nodes / 2; // process levels of the tree for(int i = 0; i < logN; i++){ if((knodes[currNode].key) > keys[bid]){ currNode = knodes[currNode].left_id; } else if ((knodes[currNode].key) < keys[bid]){ currNode = knodes[currNode].right_id; } else{ break; } } } I expect to extract a SCEV expression for the variable *keys*, however, using ScalarEvolution I also get an expression (using SE->getSCEV) for *knodes*. Since *knodes* does not evolve in terms of the loop induction variable I wasn't expec...
2005 Mar 03
0
routes and link_to
...end to be sure I don''t collide from the :controller_prefix used in rails). In my view, I have this: <% @rights.each do |right| %> <tr> <td class="column_data"><%= link_to("Delete", :action => "delete", :id => right.right_id) %></td> <td class="column_data"><%= link_to(right.right_name, :action => "update", :id => right.right_id) %></td> <td class="column_data"><%= right.right_description %></td> </tr> <%...
2007 Sep 23
3
Connecting a row of an unknown table to another row of an unknown table
Hello all, I''m currently designing a web app in Rails that lets me keep a directory of free/opensource computer games. Each game has attributes like name, website, review, etc., but each game can also be associated with a set of genres and gameplay elements. The main three tables I''m working with are "games", "genres", "elements",
2007 Jul 19
1
Storing order of sortable objects in RoR
...nction updateOrder(){ var url = ''order'' //the action var left_list = escape(Sortable.sequence(''left'')); var right_list = escape(Sortable.sequence(''right'')); var left_ids = unescape(left_list).split('',''); var right_ids = unescape(right_list).split('',''); new Ajax.Request(url, { method: ''post'', parameters: left_ids // how do I pass both left and right ids and how do I use them in the action??? }); } // ]]>...
2017 Dec 01
0
Using Scalar Evolution to Identify Expressions Evolving in terms of Loop induction variables
.../ process levels of the tree > > for(int i = 0; i < logN; i++){ > > if((knodes[currNode].key) > keys[bid]){ > currNode = knodes[currNode].left_id; > } > else if ((knodes[currNode].key) < keys[bid]){ > currNode = knodes[currNode].right_id; > } > else{ > break; > } > } > } > > I expect to extract a SCEV expression for the variable *keys*, however, > using ScalarEvolution I also get an expression > (using SE->getSCEV) for *knodes*. Since *knodes* does not evolve in terms...
2006 Apr 07
0
HABTM query return all results
...chema: create_table "rights", :force => true do |t| t.column "name", :string t.column "controller", :string t.column "action", :string end create_table "rights_roles", :id => false, :force => true do |t| t.column "right_id", :integer t.column "role_id", :integer end create_table "roles", :force => true do |t| t.column "name", :string t.column "description", :text end Rights Model: class Right < ActiveRecord::Base has_and_belongs_to_many :roles e...
2006 Dec 08
19
HABTM join table quirk
...ere added..but are minor.) Since I initially let Rails create the join table between two data tables with a HABTM relationship....I assumed it would know HOW to do it correctly. Oh well...maybe not. My tables looked like this: Rights ID name Roles ID rolename Rights_Roles ID right_id role_id The ID field is basically unneeded since this table is only for the many to many relationship. I was getting a problem when trying to add a second record to the table. It turns out the HABTM relationship was adding one of the foreign keys as the ID field as well as it''s true...