[Rails] .gemrc containing "gem: --no-ri --no-rdoc"

2015-10-29 Thread fugee ohu
I put a .gemrc file in my home directory, the same directory my Gemfile is in, with just "gem: --no-ri --no-rdoc" but when i install gems the docs still get installed, causing me to have to wait -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk"

[Rails] Re: .gemrc containing "gem: --no-ri --no-rdoc"

2015-10-30 Thread fugee ohu
Thanks Colin On Thursday, October 29, 2015 at 12:54:33 PM UTC-4, fugee ohu wrote: > > I put a .gemrc file in my home directory, the same directory my Gemfile is > in, with just "gem: --no-ri --no-rdoc" but when i install gems the docs > still get installed, causing me to h

[Rails] i need to send an email for every row in a result set without using any services

2015-10-05 Thread fugee ohu
First, before you think to recommend I'm not gonna give my mailing list any third party services because I'm not giving them my precious mailing list to use or sell or disclose I just finished reading Agile Web Development with Rails and the book had no discussion of sending emails to every row

Re: [Rails] i need to send an email for every row in a result set without using any services

2015-10-05 Thread fugee ohu
I"m sorry That's not right Anyone else? That guide only discusses sending a single email to multiple recipients On Monday, October 5, 2015 at 3:30:20 PM UTC-4, Colin Law wrote: > > On 5 October 2015 at 20:18, fugee ohu <fuge...@gmail.com > > wrote: > > First, before

[Rails] configuration: rails app with nginx and passenger on freebsd 10.1

2015-09-16 Thread fugee ohu
Hi I'm a newbie trying to get my first rails site up on my server Right now the site returns 404 Not found Here's the error from nginx-error.log and then my nginx.conf file below All the guides I've tried to follow are different Some say passenger will create a current directory between

Re: [Rails] i need to send an email for every row in a result set without using any services

2015-10-05 Thread fugee ohu
I figured it out thanks The guide you recommended was helpful Thanks again On Monday, October 5, 2015 at 3:30:20 PM UTC-4, Colin Law wrote: > > On 5 October 2015 at 20:18, fugee ohu <fuge...@gmail.com > > wrote: > > First, before you think to recommend I'm not gonna give m

[Rails] search not working right

2015-12-07 Thread fugee ohu
when the search gets submitted it only returns results for records that had the searched value in publicists from my model: def self.search(search) where("headline LIKE ?", "%#{search}%") where("storyline LIKE ?", "%#{search}%") where("publicist LIKE ?", "%#{search}%") end from my

Re: [Rails] search not working right

2015-12-07 Thread fugee ohu
cember 2015 at 13:55, fugee ohu <fuge...@gmail.com > > wrote: > > when the search gets submitted it only returns results for records that > had > > the searched value in publicists > > > > from my model: > > def self.search(search) > > where(&qu

Re: [Rails] search not working right

2015-12-07 Thread fugee ohu
>> Where did you see it posted? Have you still got the link? >> Colin http://www.korenlc.com/creating-a-simple-search-in-rails-4/ -- 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

Re: [Rails] can i pass min and max to datetime_select

2015-12-02 Thread fugee ohu
it's for scheduling, you should only be able to schedule from present to future but not have backdate options On Wednesday, December 2, 2015 at 4:21:32 AM UTC-5, Colin Law wrote: > > On 2 December 2015 at 07:03, fugee ohu <fuge...@gmail.com > > wrote: > > c

[Rails] jquery for rendering elements in forms

2015-11-29 Thread fugee ohu
i wanna use jquery to render an element identified in the view by The view is _form.html.erb called by new.html.erb So I have to create a jquery controller with an action to print content through a partial to be sent to replace the element in the form My call to jquery is in the form contained

Re: [Rails] form helper time_select "1 week", "11 days", etc ...

2015-12-01 Thread fugee ohu
yea, i tried that in the model i got goofy results something about nil i forget what so i did some reading and it looks like i should change the field type to integer and store values in seconds and then let my app work with that data -- You received this message because you are subscribed to

[Rails] Re: <%= form_for(@listing) do |f| %> prepends model name to fields

2015-12-02 Thread fugee ohu
actually it prepends in singular listing_title, listing_description, etc On Thursday, December 3, 2015 at 2:04:19 AM UTC-5, fugee ohu wrote: > > Why does <%= form_for(@listing) do |f| %> the form helpers f.select, > f.label, f.text_field, f.checkbox, f.radio_button all prep

[Rails] <%= form_for(@listing) do |f| %> prepends model name to fields

2015-12-02 Thread fugee ohu
Why does <%= form_for(@listing) do |f| %> the form helpers f.select, f.label, f.text_field, f.checkbox, f.radio_button all prepend model names to fields like listings_title, listings_description or in my browsers source listings[title] listings[description] and to avoid this i have to write

Re: [Rails] <%= form_for(@listing) do |f| %> prepends model name to fields

2015-12-03 Thread fugee ohu
i dunno, prints the result of the expression inside <% %> ? On Thursday, December 3, 2015 at 2:56:50 AM UTC-5, Colin Law wrote: > > > On 3 Dec 2015 07:04, "fugee ohu" <fuge...@gmail.com > wrote: > > > > Why does <%= form_for(@listing) do

Re: [Rails] <%= form_for(@listing) do |f| %> prepends model name to fields

2015-12-03 Thread fugee ohu
So if i take out all the prependings of listing_ using my own html instead of the rails form helpers when i submit the form i'm gonna get errors? -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop

[Rails] how do i add a record from the console

2015-12-06 Thread fugee ohu
I've been trying to do it from memory something like this, but it's not working it keeps returning rollback and false a=Admin.create a=Admin.find(1) a.email="u...@host.com" a.password="password" a.save -- You received this message because you are subscribed to the Google Groups "Ruby on

Re: [Rails] font not working

2015-12-06 Thread fugee ohu
rwise for rails 4.2+ I'm using rails 4.18 and it doesn't say anything specifically to 4.1+ so can i assume my version should be treated as 4, i don't know On Sunday, December 6, 2015 at 3:13:44 PM UTC-5, Colin Law wrote: > > On 6 December 2015 at 20:03, fugee ohu <fuge...@gmail.com

Re: [Rails] font not working

2015-12-06 Thread fugee ohu
es away and the page comes back if i put single quotes src: url('/assets/fonts/ufonts.com_ metrolis-negro-opentype.otf') format("truetype"); but the font still doesn't get applied On Sunday, December 6, 2015 at 3:13:44 PM UTC-5, Colin Law wrote: > > On 6 December 2015 at 20:03, f

[Rails] font not working

2015-12-06 Thread fugee ohu
I can't get my fonts to work Having trouble getting fonts to work I was using Berlin Sans Serif but it was working so I tried downloading another font to replace it but that's not working either I placed the font in app/assets/fonts and in my stylesheet i put the following: p@font-face

Re: [Rails] font not working

2015-12-06 Thread fugee ohu
So then I have to add to my assets.rb file something beginning with Rails.application.config.assets.precompile += %w( ? On Sunday, December 6, 2015 at 3:13:44 PM UTC-5, Colin Law wrote: > > On 6 December 2015 at 20:03, fugee ohu <fuge...@gmail.com > > wrote: > >

[Rails] form helper time_select "1 week", "11 days", etc ...

2015-12-01 Thread fugee ohu
I have a time field named duration and i wanna create a select list with options in the model for "1 week", "11 days" I know how to create for a basic select but not for time -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To

[Rails] can i pass min and max to datetime_select

2015-12-01 Thread fugee ohu
can i pass min and max to datetime_select ? -- 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

[Rails] trying to create a schedule select field so users can only select date time greater than now

2015-12-01 Thread fugee ohu
this is the way i have my select without the feature i haven't attempted to add the feature because i don't know what method that would be <%= f.datetime_select :start_time, discard_year: true %> -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk"

[Rails] simple_format helper for converting newlines to css stops working

2015-12-12 Thread fugee ohu
When I use the simple_format helper the css styling stops working How do I use the helper and preserve styling? -- 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

[Rails] Re: Failure to install or update any gem through Win CMD

2015-12-12 Thread fugee ohu
you're trying to develop on windows? On Monday, November 30, 2015 at 8:24:15 AM UTC-5, Ruby-Forum.com User wrote: > > Hello, > > I've been trying to install and update different gems to work with Ruby > on Rails, but keep getting the same error, apparently indicating I can't > install or

[Rails] simple_format not styling

2015-12-12 Thread fugee ohu
i thought simple format was a nice little helper, better than writing a manual translate function to replace newlines with html 's but the output of simple_format is unaffected by my css for the page How can I apply styling to simple_format ? -- You received this message because you are

Re: [Rails] simple_format helper for converting newlines to css stops working

2015-12-12 Thread fugee ohu
then i'll rephrase it and post it again, please don't answer next time On Saturday, December 12, 2015 at 10:15:52 AM UTC-5, Hassan Schroeder wrote: > > On Sat, Dec 12, 2015 at 4:46 AM, fugee ohu <fuge...@gmail.com > > wrote: > > When I use the simple_format helper the css

[Rails] Re: simple_format not styling

2015-12-12 Thread fugee ohu
On Saturday, December 12, 2015 at 2:53:38 PM UTC-5, fugee ohu wrote: > > i thought simple format was a nice little helper, better than writing a > manual translate function to replace newlines with html 's but the > output of simple_format is unaffected by my css for the page How ca

[Rails] form in main application layout

2016-01-04 Thread fugee ohu
i put a search box in application.html.erb and created a controller action, but i don't know how to route to the controller action -- 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

[Rails] Elasticsearch::Transport::Transport::Errors::NotFound in Devise::SessionsController#create

2016-01-04 Thread fugee ohu
I'm on linux mint I didn't find enough info googling this error The model i've configured to use elasticsearch is User or user.rb -- 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

[Rails] user profiles : same controller as the world?

2015-12-30 Thread fugee ohu
Should i use the same controller as the world for allowing users to edit, update their profiles that I use to let the world view the profiles? i have associated models and i have 2 routes going to the same controller action I'm not sure what I should do How would most websites do this? GET

[Rails] undefined method `build_

2016-01-02 Thread fugee ohu
def create @school = current_user.build_school(school_params) causes the above error my models are users has_one profile, profile has_many schools, profile belongs_to user, school belongs_to profile -- You received this message because you are subscribed to the Google Groups "Ruby on

Re: [Rails] undefined method `build_

2016-01-02 Thread fugee ohu
what should the create action be? i tried @school = current_user.build_school(school_params) On Saturday, January 2, 2016 at 4:45:20 PM UTC-5, Colin Law wrote: > > On 2 January 2016 at 20:51, fugee ohu <fuge...@gmail.com > > wrote: > > def cr

Re: [Rails] undefined method `build_

2016-01-02 Thread fugee ohu
chool_params) > > Unfortunately I don't know how your associations are setup so I'm taking a > guess at this.  > > On Jan 2, 2016, at 6:32 PM, fugee ohu <fuge...@gmail.com > > wrote: > > what should the create action be > > @school = current_user.create_school(s

Re: [Rails] undefined method `build_

2016-01-02 Thread fugee ohu
On Jan 2, 2016, at 6:32 PM, fugee ohu <fuge...@gmail.com > > wrote: > > what should the create action be > > @school = current_user.create_school(school_params) > > > On Saturday, January 2, 2016 at 4:45:20 PM UTC-5, Colin Law wrote: >> >> On 2 January 2

Re: [Rails] undefined method `build_

2016-01-02 Thread fugee ohu
Sorry Colin I fell asleep Here's how I worked it out <%= form_for(@school) do |school_form| %> <% school_form.fields_for :profiles do |f| %> On Saturday, January 2, 2016 at 4:45:20 PM UTC-5, Colin Law wrote: > > On 2 January 2016 at 20:51, fugee ohu <fuge...@gmail.com &

Re: [Rails] undefined method `build_

2016-01-02 Thread fugee ohu
what should the create action be @school = current_user.create_school(school_params) On Saturday, January 2, 2016 at 4:45:20 PM UTC-5, Colin Law wrote: > > On 2 January 2016 at 20:51, fugee ohu <fuge...@gmail.com > > wrote: > > def create > > @school

Re: [Rails] undefined method `build_

2016-01-02 Thread fugee ohu
On Jan 2, 2016, at 6:32 PM, fugee ohu <fuge...@gmail.com > > wrote: > > what should the create action be > > @school = current_user.create_school(school_params) > > > On Saturday, January 2, 2016 at 4:45:20 PM UTC-5, Colin Law wrote: >> >> On 2 January 2

[Rails] Re: undefined method `build_

2016-01-02 Thread fugee ohu
@school = current_user.create_school(school_params) undefined method `create_school' for # On Saturday, January 2, 2016 at 3:51:12 PM UTC-5, fugee ohu wrote: > > def create > @school = current_user.build_school(school_params) > > causes the above error my models ar

Re: [Rails] undefined method `build_

2016-01-02 Thread fugee ohu
2, 2016, at 6:32 PM, fugee ohu <fuge...@gmail.com > > wrote: > > what should the create action be > > @school = current_user.create_school(school_params) > > > On Saturday, January 2, 2016 at 4:45:20 PM UTC-5, Colin Law wrote: >> >> On 2 January 2

[Rails] rails associations using build_association and create_association helpers

2016-01-07 Thread fugee ohu
I have users has_one profile, profiles has_many schools, schools has_many teams I'm trying to write the new and create actions for the teams controller i'm not sure what they should be, i have something like @team= current_user.profile.build_team(team_params) which i've been trying different

[Rails] devise how to let a user change his password

2015-12-29 Thread fugee ohu
i'm using devise for users, how do i let a user change his password? -- 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

Re: [Rails] insert into 2 joined tables from the same form submission

2015-12-29 Thread fugee ohu
thanks, i found it here http://guides.rubyonrails.org/association_basics.html i just did @child.parent.attribute that works ~ thanks again On Tuesday, December 29, 2015 at 8:51:53 PM UTC-5, Walter Lee Davis wrote: > > > > On Dec 29, 2015, at 7:27 PM, fugee ohu <fuge...@gmail

[Rails] devise edit user password

2015-12-29 Thread fugee ohu
here's the way edit user password appears in my routes edit_user_password GET /users/password/edit(.:format) devise/passwords#edit so then why when i navigate to /usrs/password/edit does devise return You are already signed in ? -- You received this message because you are subscribed

Re: [Rails] insert into 2 joined tables from the same form submission

2015-12-29 Thread fugee ohu
Can you tell me how to display an attribute from the parent in a view please On Tuesday, December 29, 2015 at 8:47:59 AM UTC-5, Walter Lee Davis wrote: > > > > On Dec 29, 2015, at 8:36 AM, fugee ohu <fuge...@gmail.com > > wrote: > > > > user has many addres

Re: [Rails] devise how to let a user change his password

2015-12-29 Thread fugee ohu
thanks On Tuesday, December 29, 2015 at 8:51:13 PM UTC-5, Walter Lee Davis wrote: > > > > On Dec 29, 2015, at 6:25 PM, fugee ohu <fuge...@gmail.com > > wrote: > > > > i'm using devise for users, how do i let a user change his password? >

[Rails] link_to nested resources

2015-12-30 Thread fugee ohu
users has_one profile profile has_many schools i'm trying to build a link to this route edit_user_profile_school GET/users/:user_id/profile/schools/:id/edit(.:format) schools#edit i've been trying stuff like

Re: [Rails] devise :reconfirmable in model causes migration error

2015-12-21 Thread fugee ohu
yikes ... thanks, i think i should have read the migrations, thanks again On Monday, December 21, 2015 at 12:10:56 PM UTC-5, Hassan Schroeder wrote: > > On Mon, Dec 21, 2015 at 8:14 AM, fugee ohu <fuge...@gmail.com > > wrote: > > It seems clear that it's a bu

[Rails] trying to use the dropit menu plugin, doesn't seem to be working

2015-12-23 Thread fugee ohu
<%= current_user.email %> <%= link_to 'Messages', '/' %> <%= link_to 'Account', '/' %> <%= link_to 'Profiles', '/' %> <%= link_to 'User sign out', destroy_user_session_path, method: :delete %> $(document).ready(function() {

[Rails] how does rails know if it should submit a form to update or create?

2015-12-24 Thread fugee ohu
how does rails know if it should submit a form to update or create? the form is rendered by either new or edit so on submission how does rails know which action originally rendered the form? -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk"

[Rails] how many levels of models should has_many be applied to

2015-12-26 Thread fugee ohu
if users has many profiles and profiles has many schools and schools has many teams then the user model would look like has_many: profiles has_many: schools, through: :profiles has_many: teams, through: :schools, through: :profiles see what i mean on the third line? the teams through schools

Re: [Rails] how does rails know if it should submit a form to update or create?

2015-12-26 Thread fugee ohu
they're the same, <%= render 'form' %> is all they contain other than links and either New model or Editing model On Friday, December 25, 2015 at 4:14:36 AM UTC-5, Colin Law wrote: > > On 25 December 2015 at 07:16, fugee ohu <fuge...@gmail.com > > wrote: > > how d

[Rails] first rails join - how do i build a simple link

2015-12-27 Thread fugee ohu
user model has_many profiles so how do i build a simple link_to a logged in user's profile, i'm using devise so the logged in user's id is available at current_user.id so it's gonna be <%= link_to ... ? -- You received this message because you are subscribed to the Google Groups "Ruby on

[Rails] test if record exists in joined table

2015-12-27 Thread fugee ohu
in my layout i wanna test if the user has a profile so when he clicks profile my app know whether to present him with a show + link to edit the exisiting profile, or just a form for new profile ~ thanks -- You received this message because you are subscribed to the Google Groups "Ruby on

Re: [Rails] test if record exists in joined table

2015-12-27 Thread fugee ohu
On Sunday, December 27, 2015 at 4:15:57 PM UTC-5, Colin Law wrote: > > On 27 December 2015 at 21:07, fugee ohu <fuge...@gmail.com > > wrote: > > yikes, i dunno how @user got instantiated, i forgot to say i'm in a > view, i > > dunno if i'

Re: [Rails] test if record exists in joined table

2015-12-27 Thread fugee ohu
yikes, i dunno how @user got instantiated, i forgot to say i'm in a view, i dunno if i'm allowed to do this in a view or not:<% if Profile.find_by_user_id(current_user.id) %> On Sunday, December 27, 2015 at 3:51:45 PM UTC-5, Colin Law wrote: > > On 27 December 2015 at 20:04, fug

Re: [Rails] test if record exists in joined table

2015-12-27 Thread fugee ohu
what does this mean without the if <% user_signed_in? %> On Sunday, December 27, 2015 at 5:01:54 PM UTC-5, Colin Law wrote: > > On 27 December 2015 at 21:53, fugee ohu <fuge...@gmail.com > > wrote: > > On Sunday, December 27, 2015 at 4:35:37 PM UTC-5, Colin L

Re: [Rails] test if record exists in joined table

2015-12-27 Thread fugee ohu
thanks On Sunday, December 27, 2015 at 5:44:51 PM UTC-5, Colin Law wrote: > > On 27 December 2015 at 22:38, fugee ohu <fuge...@gmail.com > > wrote: > > what does this mean without the if <% user_signed_in? %> > > It is just a statement that evaluates to

[Rails] linking to and rendering form for a new nested resource subclass object

2015-12-27 Thread fugee ohu
this link <%= link_to('Profile', new_user_profile_path(current_user.id)) %> launched profiles#new which rendered the form with line 1 being <%= form_for(@profile) do |f| %> and cause action::controller to raise: undefined method `profiles_path' for #<#:0xb1d2aee0> -- You received this

Re: [Rails] rails routing error

2015-12-27 Thread fugee ohu
On Sunday, December 27, 2015 at 11:17:20 PM UTC-5, Przemek Kosakowski wrote: > > Hello, > > Can you show us your routing file ? > I got it solved i had declared profiles as a nested resource under users, but i still needed to declare it again, standalone resources :profiles ~ thanks -- You

Re: [Rails] test if record exists in joined table

2015-12-27 Thread fugee ohu
On Sunday, December 27, 2015 at 4:35:37 PM UTC-5, Colin Law wrote: > > On 27 December 2015 at 21:24, fugee ohu <fuge...@gmail.com > > wrote: > > On Sunday, December 27, 2015 at 4:15:57 PM UTC-5, Colin Law wrote: > >> > >> On 27 December 2015 at 21:

[Rails] new_user_profile_path

2015-12-27 Thread fugee ohu
this link <%= link_to('Profile', new_user_profile_path(current_user.id)) %> launched profiles#new which rendered the form with line 1 being <%= form_for(@profile) do |f| %> and cause action::controller to raise: undefined method `profiles_path' for #<#:0xb1d2aee0> -- You received this

[Rails] rails routing error

2015-12-27 Thread fugee ohu
clicking this link in the view <%= link_to 'Profile', new_user_profile_path(@user) %> causes NoMethodError in Profiles#new undefined method `profiles_path' here's the route from rake routes new_user_profile GET /users/:user_id/profile/new(.:format) profiles#new

[Rails] rails form submission raising ActiveRecord::RecordNotUnique

2015-12-28 Thread fugee ohu
my _form.html.erb was rendered by new.html.erb; from my form: <%= form_for(@profile) do |f| %> from firefox->tools->web developer->page source http://localhost:3000/profiles>" accept-charset="UTF-8" method="post"> and then when submitted raises ActiveRecord::RecordNotUnique in

[Rails] devise :reconfirmable in model causes migration error

2015-12-21 Thread fugee ohu
i get uninitialized constant reconfirmable when i run the migration -- 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

[Rails] how do i make a drop down menu appear when a link is hovered

2015-12-22 Thread fugee ohu
If the user's logged in i wanna display his name and when the name is hovered or clicked i want a menu to appear and wanna do this using jquery Must the element be linked to a menu or can the element be part of the menu like the title -- You received this message because you are subscribed to

Re: [Rails] devise :reconfirmable in model causes migration error

2015-12-21 Thread fugee ohu
It may not be a valid option Maybe it should only be specified as reconfirmable=true in devise.rb and not in the model On Monday, December 21, 2015 at 6:29:08 AM UTC-5, Colin Law wrote: > > On 21 December 2015 at 10:51, fugee ohu <fuge...@gmail.com > > wrote: > > i get u

Re: [Rails] devise :reconfirmable in model causes migration error

2015-12-21 Thread fugee ohu
21, 2015 at 6:29:08 AM UTC-5, Colin Law wrote: > > On 21 December 2015 at 10:51, fugee ohu <fuge...@gmail.com > > wrote: > > i get uninitialized constant reconfirmable when i run the migration > > I imagine that in user.rb you have specified devise :reconfirm

[Rails] associations in console

2015-12-29 Thread fugee ohu
if users has one profile and profiles has many schools should i be able to see schools at u.profiles.schools where u is a user object -- 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

[Rails] insert into 2 joined tables from the same form submission

2015-12-29 Thread fugee ohu
user has many addresses so i wanna put address fields in the new user registration form, i don't know how i would do it, i'm trying to conceptualize it -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and

Re: [Rails] awesome_nested_set select statement

2015-11-25 Thread fugee ohu
nice, thanks colin On Wednesday, November 25, 2015 at 11:56:06 AM UTC-5, Colin Law wrote: > > On 25 November 2015 at 16:46, fugee ohu <fuge...@gmail.com > > wrote: > > I'm sorry, i meant to say in the side pane should be links to only the > > immediate children cate

Re: [Rails] awesome_nested_set select statement

2015-11-25 Thread fugee ohu
But why are you having to reference the id? What are you trying to > get with the query you showed? > > Colin > > Listings will be shown not for all categories but for only some So if not by id how shall these categories be identified -- You received this message because you are

Re: [Rails] awesome_nested_set select statement

2015-11-25 Thread fugee ohu
> > What is the relationship between listing and category? > In what way is a listing "in" a category. > What is a leaf category? > What do you mean by listings in leaf category? > > Colin > categories has_many listings and listings belongs_to categories a listing is in a category

Re: [Rails] awesome_nested_set select statement

2015-11-25 Thread fugee ohu
so yes, that's right I'm sorry, i meant to say in the side pane should be links to only the > immediate children categories, not all descendants, just the next level > >> >> Right, now we are getting somewhere. >> So you want all the descendant categories of the current category >>

Re: [Rails] awesome_nested_set select statement

2015-11-25 Thread fugee ohu
> As I said in a previous post, if you are explicitly using model.id you > are probably not doing things the best way. Please provide details of > why you need to do this. There is almost certainly a better way. > >Let me be more clear I wanna display listings in leaf categories

Re: [Rails] awesome_nested_set select statement

2015-11-25 Thread fugee ohu
I'm sorry, i meant to say in the side pane should be links to only the immediate children categories, not all descendants, just the next level > > Right, now we are getting somewhere. > So you want all the descendant categories of the current category > (children, grand children etc), and all

Re: [Rails] awesome_nested_set select statement

2015-11-25 Thread fugee ohu
i wanna display listings for that current category and all it's child categories (if any) and in the sidebar i wanna display the child categories On Wednesday, November 25, 2015 at 8:39:05 AM UTC-5, Colin Law wrote: > > On 25 November 2015 at 12:31, fugee ohu <fuge...@gmail.com &

[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

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] 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

Re: [Rails] breadcrumbs

2015-11-26 Thread fugee ohu
wrote: > > On 26 November 2015 at 21:50, fugee ohu <fuge...@gmail.com > > 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 w

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

[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

[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|

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

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

[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

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

[Rails] categories

2015-11-23 Thread fugee ohu
I'm looking for a solution for managing categories My categories table has name , parent_id fields My first challenge is to display all categories on a single page and my next is to build select lists represenative of the tree (after this has been done I wanna integrate listings with them)

Re: [Rails] awesome_nested_set views ... help me troubleshoot

2015-11-25 Thread fugee ohu
[1m [36m (50.3ms) [0m [1mSELECT COUNT(*) FROM `categories` WHERE (`categories`.`lft` >= 0) AND (`categories`.`lft` < 0) AND (`categories`.`id` != 1) [0m descendants count = 0 i created the lft field for added functionality but never populated it i dunno where it's supposed to get it's

[Rails] awesome_nested_set adding a new category

2015-11-25 Thread fugee ohu
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 = Category.create!(:name => 'Science') *Put a new thing

Re: [Rails] awesome_nested_set views ... help me troubleshoot

2015-11-25 Thread fugee ohu
the problem is i entered a few rows to listings manually inserting just fields i thought i'd need before i implemented awesome_nested_set -- 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

Re: [Rails] awesome_nested_set views ... help me troubleshoot

2015-11-25 Thread fugee ohu
I deleted all the rows in the categories table and re-created the categories following the instructions in awesome_nested_set cheat sheet but still only a blank page loads Here's the latest from development.log ~ thanks Started GET "/store/catalog/1" for 127.0.0.1 at 2015-11-25 20:01:20 -0500

Re: [Rails] awesome_nested_set views ... help me troubleshoot

2015-11-25 Thread fugee ohu
Oh never mind, the category_id was blank in the listing The main works, on to the side, 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

Re: [Rails] awesome_nested_set select statement

2015-11-25 Thread fugee ohu
doesn't leave much for the controller ... just set category? On Wednesday, November 25, 2015 at 11:56:06 AM UTC-5, Colin Law wrote: > > On 25 November 2015 at 16:46, fugee ohu <fuge...@gmail.com > > wrote: > > I'm sorry, i meant to say in the side pane sh

[Rails] awesome_nested_set views ... help me troubleshoot

2015-11-25 Thread fugee ohu
catalog.html.erb fails to display the listings In catalog.html.erb <% @category.descendants.each do |category| %> <% category.listings.each do |listing| %> <%= listing.title %> <% end %> <% end %> In my routes.rb get '/store/catalog/:id' => 'store#catalog' In my

Re: [Rails] awesome_nested_set select statement

2015-11-25 Thread fugee ohu
yikes! but nope, it still renders a blank page, i typed some text to display just to make sure i was rendering the right file and that's confirmed -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop

[Rails] Re: ActiveRecord::RecordNotFound Couldn't find Category with 'id'=

2015-11-25 Thread fugee ohu
nevermind, solved i was using the syntax taken from rake routes in my routes.rb -- 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

Re: [Rails] awesome_nested_set select statement

2015-11-25 Thread fugee ohu
Colin thanks I'm gonna re-post my last post in this topic as a new topic so you can help me there ha ha On Wednesday, November 25, 2015 at 1:28:00 PM UTC-5, Colin Law wrote: > > On 25 November 2015 at 17:55, fugee ohu <fuge...@gmail.com > > wrote: > > doesn't leave mu

  1   2   3   4   5   6   7   8   9   10   >