Re: [Rails] awesome_nested_set adding a new category

2015-11-26 Thread fugee ohu
Sorry about the new topic btw, I didn't notice you replied here, you can disregard the other topic -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyon

Re: [Rails] awesome_nested_set adding a new category

2015-11-26 Thread fugee ohu
isn't params[:category] a reference to a single field and not all the params from the form -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-t

Re: [Rails] awesome_nested_set adding a new category

2015-11-26 Thread fugee ohu
Why not Category.create!(category_params) instead of Category.create!(params[:category]) ? thanks -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonr

[Rails] objects in the create method

2015-11-26 Thread fugee ohu
I'm trying to follow this example in my controller: science = Category.create!(:name => 'Science') but most create actions look like @science=Category.new(science_params) do I need the object to be an array beginning with @ -- You received this message because you are subscribed to the Goog

[Rails] awesome_nested_set adding categories

2015-11-26 Thread fugee ohu
I'm able to follow the docs and create categorie from the rails console but I'm having trouble working those instructions into my controller I know this is wrong I dunno if I can use category instead of @category for the object The browser returns syntax error for the respond to do |format| line

Re: [Rails] breadcrumbs

2015-11-26 Thread fugee ohu
Nevermind Colin, It was the same thing we did before with awesome_nested_set The breadcrumbs gem wasn't needed at all I've got them displayed at the top of every page with no delimiter but they're underlined it looks good like that On Thursday, November 26, 2015 at 5:10:39 PM UTC-5, Colin Law w

[Rails] awesome_nested_set breadcrumbs

2015-11-26 Thread fugee ohu
i'm using awesome_nested_set for categorires and i wanna have breadcrumbs at the top of every page I was trying to figure out how to use a breadcrumb gem wtih this but now i'm thinking the breadcrumb gem isn't gonna save me any work i have to write the breadcrumbs code from scratch using the he

Re: [Rails] breadcrumbs

2015-11-26 Thread fugee ohu
> I must say you have a great propensity for asking questions without > providing anything like enough information. I presume you are using a > breadcrumb gem but you have not told us which one. Also which docs > are you referring to? > >I guess this has to be integrated with awesome_ne

Re: [Rails] breadcrumbs

2015-11-26 Thread fugee ohu
> I must say you have a great propensity for asking questions without > providing anything like enough information. I presume you are using a > breadcrumb gem but you have not told us which one. Also which docs > are you referring to? > > Colin > gem 'breadcrumbs_on_rails' docs https://

Re: [Rails] Variable scope in rails controller

2015-11-26 Thread Colin Law
On 26 November 2015 at 05:23, Sai Ch wrote: > Hi, > > I need to access one variable in entire controller i.e it is accessible > to all actions in controller. > > I had tried with session and class variable but for example > > def create >document_id = get_document >@@document_id = sessio

Re: [Rails] breadcrumbs

2015-11-26 Thread Colin Law
On 26 November 2015 at 21:50, fugee ohu wrote: > It says in the docs that i should put an add_breadcrumb line in my > controller for each page i wanna add to the stack and then just render > breadcrumbs in my view but when i do that it prints the whole stack, > whatever's in the controller, in tha

[Rails] Variable scope in rails controller

2015-11-26 Thread Sai Ch
Hi, I need to access one variable in entire controller i.e it is accessible to all actions in controller. I had tried with session and class variable but for example def create document_id = get_document @@document_id = session[:document_id] = document_id end def validate if docume

[Rails] breadcrumbs

2015-11-26 Thread fugee ohu
It says in the docs that i should put an add_breadcrumb line in my controller for each page i wanna add to the stack and then just render breadcrumbs in my view but when i do that it prints the whole stack, whatever's in the controller, in that order, regardless of the page i'm on -- You rece

Re: [Rails] awesome_nested_set select statement

2015-11-26 Thread fugee ohu
Works good now Thanks -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscr...@googlegroups.com. To post to this group, send email to

Re: [Rails] Re: I have no idea what this means

2015-11-26 Thread Bayram Kuliyev
Eli, "Migrations are pending" means that you have created a migration file (in db/migrate folder) BUT a real database table has not been created yet. Simply creating a migration file does not create a database table. So you need to tell your rails application to create the table by entering 'bin/ra

Re: [Rails] awesome_nested_set adding a new category

2015-11-26 Thread Colin Law
On 25 November 2015 at 23:29, fugee ohu wrote: > in this example what if i didn't have a values for science, physics and > gravity but had to get it from form what field would i use? my guess any of > the 3 variables can be substituted with params[:id] ? > > Create a root node: > > science = Categ